Commit Graph

230 Commits

Author SHA1 Message Date
levlam
e608fdca7b Add td_api::textEntityTypeBlockQuote. 2023-10-02 23:23:45 +03:00
levlam
6c88f6dbfe Update list of TLDs. 2023-10-06 00:22:43 +03:00
levlam
45dfc6e51b Use FlatHashSet to store unallowed boundaries. 2023-05-19 14:03:22 +03:00
levlam
d510bc8435 Use FlatHashSet to store common TLDs. 2023-05-19 14:00:49 +03:00
levlam
cbb10e0f3d Remove 4-letter usernames from the list of short usernames. 2023-05-18 02:05:58 +03:00
levlam
f3a1407f8f Simplify constant FlatHashSet initialization. 2023-05-18 02:03:39 +03:00
levlam
f8853fb938 Skip new entities for some bots. 2023-05-01 13:44:41 +03:00
levlam
7c3822d932 Add and use ContactsManager::get_input_user_force. 2023-03-22 18:18:35 +03:00
levlam
e7242b1188 Fix includes. 2023-03-06 20:36:56 +03:00
levlam
896de65c3e Improve field name. 2023-02-11 22:37:43 +03:00
levlam
3f7148407c Keep bot commands and media timestamps in translated text. 2023-01-18 20:45:46 +03:00
levlam
3121757b32 Add functions for conversion between FormattedText and textWithEntities. 2023-01-18 15:38:36 +03:00
levlam
eeb73d4eb2 Optimize parsing of argument value in HTML tags. 2023-01-09 17:14:31 +03:00
levlam
137fd3beb9 Replace text in-place in parse_html. 2023-01-09 15:12:14 +03:00
levlam
fd53a81603 Replace text in-place in parse_markdown. 2023-01-09 13:11:45 +03:00
levlam
34226ac4ad Recheck UTF-8 in parse_html only if needed. 2023-01-09 12:59:14 +03:00
levlam
0fb64f97a4 Use StringBuilder to create new string in parse_html. 2023-01-09 12:43:15 +03:00
levlam
2ba41ac279 Explicitly use std::move to return entities. 2023-01-09 10:46:49 +03:00
levlam
4dc554bd08 Avoid some minor string copying in message entity parsing. 2023-01-09 00:48:45 +03:00
levlam
1c037ff0e0 Don't send more than 100 user entities to server. 2023-01-08 23:07:57 +03:00
levlam
cf1984844b Update copyright year. 2023-01-01 00:28:08 +03:00
levlam
af05db3f15 Add td::Hash and use it everywhere instead of unusable std::hash. 2022-11-23 19:37:32 +03:00
levlam
d8c36c8062 Improve handling of too long messages and captions. 2022-11-03 16:46:50 +03:00
levlam
0bf3e7f0e6 Treat usernames of length 4 as valid. 2022-10-25 19:25:15 +03:00
levlam
807d18cefc Improve documentation. 2022-10-19 13:14:16 +03:00
levlam
aa6ed42734 Add class CustomEmojiId. 2022-10-03 01:26:32 +03:00
levlam
faa738d6a9 Keep only Slice overload of utf8_utf16_substr. 2022-09-22 12:08:34 +03:00
levlam
4543c485a7 Optimize fix_url. 2022-08-20 13:44:55 +03:00
levlam
0649b7e2fa Add allocation-free fast path to is_common_tld. 2022-08-20 12:56:52 +03:00
levlam
fc9e878539 Optimize is_email_address. 2022-08-20 12:44:22 +03:00
levlam
4206246b0c Simplify match_url code. 2022-08-20 11:34:21 +03:00
levlam
0d2ddc2d56 Allow only domain symbols in user data after first dot to improve performance. 2022-08-19 21:01:39 +03:00
levlam
96cca84a60 Remove source from next_utf8_unsafe. 2022-08-19 16:37:44 +03:00
levlam
a8b3573a00 Always pass non-null pointer to next_utf8_unsafe. 2022-08-19 16:19:58 +03:00
levlam
04b98aa385 Use OptionManager directly if possible. 2022-08-18 17:00:18 +03:00
levlam
3318ffdb20 Proxy all option-related requests through G. 2022-08-17 16:11:13 +03:00
levlam
bbac7baed0 Add setUserSupportInfo. 2022-08-15 16:58:28 +03:00
levlam
f0a89c3dbe Remove process_input_caption in favor of get_formatted_text. 2022-08-15 16:26:51 +03:00
levlam
8b61255387 Add additional parameters to get_formatted_text. 2022-08-15 16:16:50 +03:00
levlam
b1e43bfbd5 Pass FormattedText to get_first_url. 2022-08-15 15:55:48 +03:00
levlam
47c0f387de Add get_formatted_text function. 2022-08-15 15:37:17 +03:00
levlam
8f433070df Minor fixes. 2022-08-14 15:04:08 +03:00
levlam
2e687480c0 Allow premium emoji in Saved Messages. 2022-08-01 01:53:36 +03:00
levlam
fc72eeaff7 Skip more types of empty entities. 2022-07-31 00:44:51 +03:00
levlam
2c9e1767dd Ignore empty entities loaded from database. 2022-07-31 00:34:30 +03:00
levlam
8f81a46ede Allow some new characters in hashtags. 2022-07-29 16:23:05 +03:00
levlam
a5da79327d Preload and check all custom emoji in secret chats. 2022-07-27 23:47:16 +03:00
levlam
36c6b84ec8 Add remove_premium_custom_emoji_entities. 2022-07-27 23:36:44 +03:00
levlam
e601012e9f Remove known premium emoji from secret chat messages from non-premium users. 2022-07-27 21:52:42 +03:00
levlam
84202b5554 Add limit on the total number of entities in secret chat messages. 2022-07-27 21:28:43 +03:00