Commit Graph

7514 Commits

Author SHA1 Message Date
levlam
4b538adbdb Remove redundant Slice copy constructor usages. 2023-02-21 11:21:07 +03:00
levlam
a369025cd3 Improve NetQuery debug. 2023-02-20 13:11:39 +03:00
levlam
bc8811ea82 Simplify MessagesManager::can_unload_message for bots; allow to unload the last message. 2023-02-20 12:40:49 +03:00
levlam
6e0ed42544 tg_cli: remove as_button_id. 2023-02-19 11:21:42 +03:00
levlam
bdbb8613f7 Improve PhotoSize type logging. 2023-02-18 23:14:59 +03:00
levlam
e3fac31061 Log photo date. 2023-02-18 23:09:04 +03:00
levlam
6c38e3c018 Use G()->close_status() instead of manual error. 2023-02-17 16:14:31 +03:00
levlam
3fef62a396 Reuse default_result. 2023-02-17 16:06:38 +03:00
levlam
6cf6f32418 Add Global::ignore_result_if_closing. 2023-02-16 13:35:27 +03:00
levlam
337bdc5f5e Use request promise in getWebPagePreview. 2023-02-15 15:05:37 +03:00
levlam
d9a4e5572f Don't pass default is_optional value to get_json_object_string_field. 2023-02-14 15:21:10 +03:00
levlam
abbeffe964 Improve thumbnail variable names. 2023-02-14 15:10:27 +03:00
levlam
896de65c3e Improve field name. 2023-02-11 22:37:43 +03:00
levlam
6ba394fc41 Add class StickerMaskPosition. 2023-02-09 20:15:21 +03:00
levlam
5a39bb4952 Use error code returned by get_input_file_id. 2023-02-09 18:31:02 +03:00
levlam
7b759a06bc Add StickersManager::get_sticker_input_document. 2023-02-09 17:26:50 +03:00
levlam
58c4a12ca6 Fix getPremiumStickers. 2023-02-08 18:36:54 +03:00
levlam
7eee3f469a Update clang-format to 16.0.0. 2023-02-08 15:28:36 +03:00
levlam
1e6c3ef93d Don't try to reload data mutiple times without network. 2023-02-06 20:31:17 +03:00
levlam
d4833b7844 Reload autosave settings periodically. 2023-02-06 20:10:27 +03:00
levlam
2260944afe Save autosave settings to database. 2023-02-06 19:53:21 +03:00
levlam
3d0140b3ef Fix SQLite key-value usage. 2023-02-06 15:41:22 +03:00
levlam
43e5f2aded Support updateAutosaveSettings in getCurrentState. 2023-02-05 10:04:19 +03:00
levlam
f6616f6ba3 Fix creator in ForumTopicInfo. 2023-02-04 17:59:17 +03:00
levlam
e9aa2fd64b Don't try to check password without checkAuthenticationPassword/recoverAuthenticationPassword query. 2023-02-04 13:36:01 +03:00
levlam
9bf492dbc0 Fix warnings. 2023-02-04 09:55:11 +03:00
levlam
2f46132aa2 Send updateAutosaveSettings. 2023-02-04 03:32:16 +03:00
levlam
810b58d55a Check and fix max_video_file_size. 2023-02-03 16:49:17 +03:00
levlam
7556ef4b18 Support telegram_api::updateAutoSaveSettings. 2023-02-03 16:08:44 +03:00
levlam
39f4091ac5 Add td_api::setAutosaveSettings. 2023-02-03 15:58:15 +03:00
levlam
498f507646 Improve class names. 2023-02-03 13:45:51 +03:00
levlam
255d887bce Add td_api::clearAutosaveSettingsExceptions. 2023-02-03 13:07:43 +03:00
levlam
c5c9707837 Add td_api::getAutosaveSettings. 2023-02-03 12:39:23 +03:00
levlam
216b6e1acf Add AutosaveManager. 2023-02-03 10:41:31 +03:00
levlam
3179d35694 Update version to 1.8.11. 2023-02-02 19:19:34 +03:00
levlam
0adcac246a Use explicit as_mutable_slice to get MutableSlice. 2023-02-02 17:40:47 +03:00
levlam
38b2fbe176 Fix query merge while closing. 2023-02-02 03:15:10 +03:00
levlam
882de6e8e8 Replace unsafe to maintain data_ field with get_data() method. 2023-02-02 03:08:26 +03:00
levlam
6be6871b5b Fix error handling in QueryMerger. 2023-02-01 18:56:28 +03:00
levlam
d824cec905 Add get_custom_emoji_stickers_unlimited. 2023-02-01 03:48:06 +03:00
levlam
7596600548 Reload default chat photo custom emoji identifiers. 2023-02-01 02:35:57 +03:00
levlam
783a73b0e6 Fix formatting. 2023-02-01 02:18:02 +03:00
levlam
b067159d78 Improve chat type check. 2023-02-01 02:10:03 +03:00
levlam
b1ea693f1b Don't try to repair empty draft message. 2023-02-01 01:51:41 +03:00
levlam
ec7c72e942 Check chat activness. 2023-02-01 01:48:05 +03:00
levlam
101afa286e Don't check bot_is_member and bot_administrator_rights. 2023-02-01 00:40:39 +03:00
levlam
a347eb4da3 Add ability to check shared with bot user/chat. 2023-01-31 16:52:05 +03:00
levlam
ade5a089e9 Implement ReplyMarkup::check_shared_dialog. 2023-01-31 16:40:51 +03:00
levlam
9d5299820c Add updateNewChatJoinRequest.user_chat_id. 2023-01-31 13:50:40 +03:00
levlam
4d70d1e920 Minor improvements. 2023-01-31 13:33:30 +03:00
levlam
ed32026958 Increase MessageUnsupported version. 2023-01-30 21:47:54 +03:00
levlam
68d7353350 Add listener nullability checks. 2023-01-30 18:21:57 +03:00
levlam
784b46a298 Add td_api::deviceTokenHuaweiPush. 2023-01-30 15:42:15 +03:00
levlam
47fd88b33f Add and use "since_last_open" internal option. 2023-01-30 01:29:33 +03:00
levlam
0469ac0147 Add inputChatPhotoSticker. 2023-01-30 00:35:14 +03:00
levlam
5666925e5b Don't postpone updates during initial getDifference. 2023-01-29 12:49:25 +03:00
levlam
23b345f87c Improve LinkManager::get_external_link_info. 2023-01-28 03:41:17 +03:00
levlam
75dacac872 Add td_api::emojiCategoryTypeChatPhoto. 2023-01-27 15:16:40 +03:00
levlam
25cdd0e6ec Ignore message_thread_id for channel posts. 2023-01-26 01:12:23 +03:00
levlam
a4f61ce47d Add td_api::premiumFeatureRealTimeChatTranslation. 2023-01-25 21:26:09 +03:00
levlam
17f16ce839 Avoid duplicate updateUserStatus updates for self. 2023-01-25 21:00:41 +03:00
levlam
f6485e711e Add StickersManager::get_used_language_codes_string. 2023-01-25 20:25:23 +03:00
levlam
f9b81efe4b Replace result with "Request Aborted" error only if it is successful. 2023-01-25 19:58:23 +03:00
levlam
5cd523408d Asynchronously check local location of all viewed and opened files. 2023-01-25 19:25:04 +03:00
levlam
5a6fb91bd9 Remove unneeded logging. 2023-01-25 17:50:42 +03:00
levlam
2325c5041b Collect statistics about received updates. 2023-01-25 17:48:04 +03:00
levlam
30cdbe69b6 Store emoji groups in the database. 2023-01-25 16:23:34 +03:00
levlam
57548741c4 Send updateNewMessage after file upload has started. 2023-01-25 13:03:57 +03:00
levlam
b02f134798 Add td_api::EmojiCategoryType. 2023-01-24 21:38:53 +03:00
levlam
ae3a96e52d Fix language pack information repair. 2023-01-24 18:34:49 +03:00
levlam
8730fd6f34 Add td_api::getEmojiCategories. 2023-01-24 18:11:02 +03:00
levlam
f51bea81e1 Support search by multiple emojis in getStickers. 2023-01-24 15:15:37 +03:00
levlam
e5b557f55c Improve function name. 2023-01-23 23:46:51 +03:00
levlam
587a882270 Don't remove emoji selectors in search_stickers. 2023-01-23 22:10:23 +03:00
levlam
833c7c30da Allow mutiple emojis in searchStickers. 2023-01-23 21:40:32 +03:00
levlam
e5441b5ed7 Support sticker_type in searchStickers. 2023-01-23 21:07:42 +03:00
levlam
b6fc03e3bb Add StickersManager::reload_found_stickers helper. 2023-01-23 19:58:34 +03:00
levlam
94819c2218 Fix handling of requestPeerTypeBroadcast. 2023-01-23 19:39:30 +03:00
levlam
0feb0f15ce Improve names of methods and message contents related to sharing user/chat with a bot. 2023-01-23 18:19:35 +03:00
levlam
c4568db488 Add more t.me domains for web clients. 2023-01-23 17:43:15 +03:00
levlam
8f3606fb2c Add more service t.me subdomains. 2023-01-23 17:28:39 +03:00
levlam
a1543b0332 Add td_api::suggestedActionSubscribeToAnnualPremium. 2023-01-23 16:11:26 +03:00
levlam
4a5b702f11 Add suggestedActionUpgradePremium. 2023-01-23 16:03:32 +03:00
levlam
136a50d0ae Add translateMessageText. 2023-01-23 15:46:26 +03:00
levlam
8560ddfe84 Ignore min-channel photo for unavailable channels. 2023-01-23 14:29:16 +03:00
levlam
a7e4c54f63 Support stickers in setChatPhoto. 2023-01-23 13:53:23 +03:00
levlam
7d2442f57f Make StickeerPhotoSize fields private. 2023-01-23 13:02:10 +03:00
levlam
fac51c9819 Check provided custom emoji and sticker identifiers. 2023-01-23 12:50:39 +03:00
levlam
69c6a485ba Add sticker.id. 2023-01-23 12:18:51 +03:00
levlam
0b07533506 Imptove StickerPhotoSize field names. 2023-01-23 12:05:08 +03:00
levlam
61dee568d1 Move get_chat_photo_sticker_object to StickerPhotoSize class. 2023-01-23 11:56:09 +03:00
levlam
0e1537420c Improve video size processing. 2023-01-23 11:51:00 +03:00
levlam
345709f1ff Store StickerPhotoSize in unique_ptr to optimize Photo size. 2023-01-23 00:57:40 +03:00
levlam
d6502824b3 Improve get_sticker_photo_size. 2023-01-21 02:07:42 +03:00
levlam
eade454791 Move StickerPhotoSize to separate files. 2023-01-21 01:51:38 +03:00
levlam
425bd0e364 Support sticker chat photos. 2023-01-20 17:31:33 +03:00
levlam
8137572794 Send updateChatIsTranslatable when premium is switched on or off. 2023-01-20 12:57:06 +03:00
levlam
337aef5c02 Support chat.is_translatable, toggleChatIsTranslatable and updateChatIsTranslatable. 2023-01-20 12:38:25 +03:00
levlam
315a526fba Add information for Premium subscription upgrade. 2023-01-20 00:41:18 +03:00
levlam
b339976ddf Add storePaymentPurposePremiumSubscription.is_upgrade. 2023-01-19 16:49:57 +03:00
levlam
65ddaea0f6 Add sendAuthenticationFirebaseSms. 2023-01-19 16:45:47 +03:00
levlam
f596ec7793 Allow to request Firebase Authentication in official apps. 2023-01-19 15:36:23 +03:00
levlam
1d9f2d6de9 Add authenticationCodeTypeFirebaseIos. 2023-01-19 15:12:55 +03:00
levlam
f0e4a4cdc8 Add authenticationCodeTypeFirebaseAndroid. 2023-01-19 14:46:33 +03:00
levlam
a14d749893 Allow to upload custom emoji photos. 2023-01-19 14:06:27 +03:00
levlam
68e939985f Support CustomEmojiSize. 2023-01-18 22:25:25 +03:00
levlam
3f7148407c Keep bot commands and media timestamps in translated text. 2023-01-18 20:45:46 +03:00
levlam
e26aecc87a Support translation of formatted text. 2023-01-18 16:34:49 +03:00
levlam
3121757b32 Add functions for conversion between FormattedText and textWithEntities. 2023-01-18 15:38:36 +03:00
levlam
8c43a7c0bb Add TranslationManager. 2023-01-18 14:47:31 +03:00
levlam
7288e90211 Untie can_send_messages right from other rights. 2023-01-17 18:13:27 +03:00
levlam
696c7ef21d Fix AuthManager::on_sent_code. 2023-01-17 13:39:52 +03:00
levlam
2d7608459e Support standalone SetPassword suggested action. 2023-01-17 13:22:21 +03:00
levlam
91ab399946 Improve repair of unread reaction count. 2023-01-16 20:30:52 +03:00
levlam
24786e05d0 Improve error messages. 2023-01-16 16:55:05 +03:00
levlam
fcb5e068e0 Open main connection before authorization. 2023-01-16 16:43:07 +03:00
levlam
f6168879af Explicitly fail reload attachment menu bot queries. 2023-01-16 15:16:36 +03:00
levlam
14fbdf5928 Forcely load chosen chat from database. 2023-01-13 17:47:08 +03:00
levlam
97cc57a25c Add td_api::sendChosenChat. 2023-01-13 17:16:16 +03:00
levlam
0b54e28467 Add td_api::sendChosenUser. 2023-01-13 17:03:35 +03:00
levlam
4922b0c776 Add messageUserChosen. 2023-01-11 20:03:43 +03:00
levlam
9a2dd58b6f Implement RequestedDialogType. 2023-01-11 19:52:35 +03:00
levlam
1afcc3bcfd Add separate keyboardButtonTypeRequestUser. 2023-01-11 18:31:49 +03:00
levlam
83403d9836 Add keyboardButtonTypeRequestChat. 2023-01-11 16:54:46 +03:00
levlam
06a432a373 Add td_api::messageChatChosen. 2023-01-10 16:20:30 +03:00
levlam
6f3d7ac308 Add td_api::getDefaultProfilePhotoCustomEmojiStickers. 2023-01-10 15:40:52 +03:00
levlam
84077d72dc Add td_api::getDefaultChatPhotoCustomEmojiStickers. 2023-01-10 15:23:07 +03:00
levlam
f0d0ac6b78 Allow to create forum supergroups. 2023-01-09 21:43:51 +03:00
levlam
ad8ecec67c Support separate chat permissions for different media types. 2023-01-06 14:16:34 +03:00
levlam
69760f891a Make DialogParticipant flags 64-bit. 2023-01-06 13:43:46 +03:00
levlam
f638e83e34 Support authentication_token after authorization. 2023-01-06 13:00:21 +03:00
levlam
2cdb35d2fb Support auth.sentCodeSuccess. 2023-01-06 12:53:24 +03:00
levlam
050a11ece7 Update layer to 152. 2023-01-06 12:42:16 +03:00
levlam
758ced943e Don't use Time::now_cached in Session. 2023-01-19 12:27:23 +03:00
levlam
1588f0d687 Return after call to on_error. 2023-01-18 17:10:08 +03:00
levlam
42af57ee05 Support General topic in getMessageThread. 2023-01-17 15:34:31 +03:00
levlam
754ff0fc53 Improve handling of internal options with updates. 2023-01-17 14:24:18 +03:00
levlam
02a4851e12 Fix set_option_empty. 2023-01-17 13:55:51 +03:00
levlam
4408af6643 Improve "id" variable names in FileManager. 2023-01-16 13:30:03 +03:00
levlam
ad8f0c4146 Improve some spelling. 2023-01-16 12:59:43 +03:00
levlam
c508e54a49 Improve message_id variable names in Session. 2023-01-15 23:27:58 +03:00
levlam
8d8f72a17a Fix some lower-case spelling. 2023-01-15 12:00:26 +03:00
levlam
052d5e120b Improve some mixed-case spelling. 2023-01-15 11:25:54 +03:00
levlam
45ff12ca49 Improve PTS/QTS spelling. 2023-01-15 11:05:53 +03:00
levlam
fb935a8de2 Reduce ping timeout in primary non-main-DC connections. 2023-01-15 00:25:22 +03:00
levlam
973df16c88 Improve logging. 2023-01-14 23:08:50 +03:00
levlam
1a732db19e Explicitly fail some promises on closing. 2023-01-14 22:01:35 +03:00
levlam
fb79543d41 Combine getChannel queries with the same channel_id. 2023-01-13 15:42:15 +03:00
levlam
d3690e1502 Merge GetChat queries. 2023-01-13 14:45:53 +03:00
levlam
13e8094aaa Reload contacts if failed to load the from database. 2023-01-13 14:38:36 +03:00