Commit Graph

10041 Commits

Author SHA1 Message Date
levlam
1fba0f0c84 Move can_use_premium_custom_emoji to DialogManager. 2024-03-10 03:15:01 +03:00
levlam
919a1d8329 Move on_update_bot_commands to DialogManager. 2024-03-09 23:35:12 +03:00
levlam
b1b33cf427 Fix compilation error. 2024-03-08 23:32:57 +03:00
levlam
b3b63bbdc1 Update version to 1.8.26. 2024-03-08 14:33:22 +03:00
levlam
52d9ac02ba Split business opening hours by week days. 2024-03-08 14:14:28 +03:00
levlam
64094e17c0 Sanitize business work hours. 2024-03-08 13:03:23 +03:00
levlam
046ed45152 Various fixes. 2024-03-07 14:09:31 +03:00
levlam
6e44c27db0 Improve includes. 2024-03-07 13:56:57 +03:00
levlam
d08ad22a2b Use explicit cast. 2024-03-07 12:03:22 +03:00
levlam
a1bcec491d Fix QuickReplyManager::get_shortcut_it. 2024-03-06 17:05:30 +03:00
levlam
2d43bdf03c Fix query promise. 2024-03-06 16:52:54 +03:00
levlam
bc1a8d2bc2 Add quickReplyMessage.reply_markup. 2024-03-06 15:56:50 +03:00
levlam
06831c2836 Return null as businessInfo if empty. 2024-03-06 15:11:16 +03:00
levlam
b255a21733 Fix chat folder tags. 2024-03-05 23:27:56 +03:00
levlam
d1638a0fc4 Allow to add any WEBP sticker to favorite stickers. 2024-03-05 22:01:19 +03:00
levlam
ef636ea07c Improve QuickReplyManager::update_shortcut_from. 2024-03-05 18:12:05 +03:00
levlam
b69eaf8669 Send update about quick reply messages only after shortcut updates. 2024-03-05 18:04:40 +03:00
levlam
85f8f5ec87 Improve QuickReplyManager::get_current_state. 2024-03-05 18:02:11 +03:00
levlam
a9ab6b739c Disable QuickReplyManager for bots. 2024-03-05 17:58:40 +03:00
levlam
2e0d52f618 Ignore service and live location messages in quick replies. 2024-03-05 16:41:10 +03:00
levlam
e91b946015 Remove get_shortcut_it(const string &name). 2024-03-05 16:40:17 +03:00
levlam
eaba45ebcb Load quick replies from database in more places. 2024-03-05 16:25:39 +03:00
levlam
401318d812 Reget messages with unsupported or legacy content. 2024-03-05 15:49:42 +03:00
levlam
dd06d5ccb2 Combine get_quick_reply_shortcuts and load_quick_reply_shortcuts. 2024-03-05 15:38:56 +03:00
levlam
3d397c1d35 Add load_quick_reply_shortcuts. 2024-03-05 15:30:57 +03:00
levlam
b53fca6284 Rename option to "quick_reply_shortcut_message_count_max". 2024-03-05 14:44:57 +03:00
levlam
f1c3bb5c33 Fix sending update about changed shortcut. 2024-03-05 14:41:35 +03:00
levlam
c4d92b3f00 Ignore edit_hide for quick replies. 2024-03-05 14:25:09 +03:00
levlam
8dcf5c4bca Fix quick reply count updating. 2024-03-05 14:17:18 +03:00
levlam
f0b745b291 Save only server and local quick reply messages. 2024-03-05 13:42:21 +03:00
levlam
bd97e81c32 Add td_api::sendQuickReplyShortcutMessages. 2024-03-05 13:08:26 +03:00
levlam
5a0a3f2c14 Add chat type check in get_quick_reply_message_contents. 2024-03-04 22:33:25 +03:00
levlam
f11ad19a4f Ignore saved_peer_id in quick reply messages. 2024-03-04 22:30:24 +03:00
levlam
464973839e Add QuickReplyManager::get_quick_reply_message_contents. 2024-03-04 20:06:32 +03:00
levlam
848b907b1a Remove comment about disable_web_page_preview being a local field. 2024-03-04 18:55:03 +03:00
levlam
3103a6d82c Remove QuickReplyMessage.noforwards. 2024-03-04 18:53:51 +03:00
levlam
f43ba61252 Add td_api::deleteBusinessConnectedBot. 2024-03-04 18:17:57 +03:00
levlam
84ecc89d20 Add td_api::setBusinessConnectedBot. 2024-03-04 17:59:29 +03:00
levlam
5c764d1716 tg_cli: add as_business_recipients. 2024-03-04 17:55:29 +03:00
levlam
d56025f609 Add td_api::getBusinessConnectedBot. 2024-03-04 17:17:10 +03:00
levlam
261a3d0c22 Move business info setters to BusinessManager. 2024-03-04 16:57:36 +03:00
levlam
e78c0aa360 Add empty BusinessManager. 2024-03-04 16:39:30 +03:00
levlam
a629700b3c Add class BusinessConnectedBot. 2024-03-04 16:06:36 +03:00
levlam
fbc738c8df Improve updates after quick reply message deletion. 2024-03-04 15:11:36 +03:00
levlam
f03bdc7e50 Add td_api::setQuickReplyShortcutName. 2024-03-04 15:00:00 +03:00
levlam
74c5ba7087 Add td_api::checkQuickReplyShortcutName. 2024-03-04 14:34:47 +03:00
levlam
e61c4d03e5 Add "quick_reply_message_count_max" option. 2024-03-04 13:28:55 +03:00
levlam
f7b6f81c52 Add "quick_reply_shortcut_count_max" option. 2024-03-04 13:27:23 +03:00
levlam
e2eba91ee2 Allow to add to recent stickers arbitrary WEBP stickers. 2024-03-01 22:35:48 +03:00
levlam
f726ca930b Add td_api::toggleChatFolderTags. 2024-03-01 19:28:32 +03:00
levlam
3221d42d7b Add updateChatFolders.are_tags_enabled. 2024-03-01 16:57:10 +03:00
levlam
b9c66aaea6 Support chat folder color. 2024-03-01 15:57:30 +03:00
levlam
60ee05aef7 Support Away messages sent only when the user is offline. 2024-03-01 14:44:42 +03:00
levlam
00e9793f09 Improve reload_quick_reply_messages. 2024-03-01 13:39:26 +03:00
levlam
8a5f4afa91 Add source to delete_quick_reply_messages. 2024-02-29 21:59:53 +03:00
levlam
de6f15c973 Add td_api::deleteQuickReplyShortcutMessages. 2024-02-29 21:34:45 +03:00
levlam
3d60b43196 Register quick reply message files. 2024-02-29 21:05:56 +03:00
levlam
3022da6b83 Add and use QuickReplyManager::update_quick_reply_message. 2024-02-29 20:58:30 +03:00
levlam
fd5a6389ec Delete files from deleted quick reply messages. 2024-02-29 19:01:40 +03:00
levlam
3f85140627 Support file reference repair for quick reply messages. 2024-02-29 17:41:05 +03:00
levlam
ee25355ba6 Prevent adding back of deleted messages. 2024-02-29 17:27:12 +03:00
levlam
29718b5880 Add delete_quick_reply_messages(Shortcut *). 2024-02-29 17:21:55 +03:00
levlam
cc40178558 Add class QuickReplyMessageFullId. 2024-02-29 17:11:39 +03:00
levlam
b2884dcd0b Add QuickReplyManager::reload_quick_reply_message. 2024-02-29 17:05:00 +03:00
levlam
23af1419d0 Support telegram_api::updateQuickReplyMessage. 2024-02-29 16:39:38 +03:00
levlam
fb85728597 Add source to get_update_quick_reply_shortcut_messages_object. 2024-02-29 16:10:15 +03:00
levlam
3b62a65bea Add td_api::loadQuickReplyShortcutMessages instead of getQuickReplyShortcutMessages. 2024-02-29 16:05:16 +03:00
levlam
c99dd3d59d Add td_api::updateQuickReplyShortcutMessages. 2024-02-29 15:55:38 +03:00
levlam
b7ee5c2ada Support updateDeleteQuickReplyMessages. 2024-02-29 14:43:32 +03:00
levlam
2e4a9c11d3 Reload quick reply messages after reloading the list of quick reply shortcuts. 2024-02-28 17:42:41 +03:00
levlam
9720651164 Add and use QuickReplyManager::get_quick_reply_messages_hash. 2024-02-28 17:38:17 +03:00
levlam
aeea69e674 Add td_api::getQuickReplyShortcutMessages. 2024-02-28 17:19:28 +03:00
levlam
139d1d92ae Save quick reply shortcuts to binlog. 2024-02-27 23:47:29 +03:00
levlam
b7e8584260 Remove QuickReplyMessage.is_copy. 2024-02-27 22:06:01 +03:00
levlam
4e198f0fe5 Remove quickReplyMessage.forward_info. 2024-02-27 20:52:59 +03:00
levlam
f13f409e5f Send shortcut identifiers in updates and receive them in requests. 2024-02-27 18:10:11 +03:00
levlam
88363b1113 tg_cli: add ShortcutId. 2024-02-27 16:16:28 +03:00
levlam
7b257b4def Rename work hours to opening hours. 2024-02-27 16:03:34 +03:00
levlam
50ba48fbfa Add td_api::setBusinessGreetingMessageSettings. 2024-02-27 14:26:19 +03:00
levlam
66761d1950 Add td_api::setBusinessAwayMessageSettings. 2024-02-27 14:18:56 +03:00
levlam
44bdcd4920 Add businessInfo.greeting_message_settings. 2024-02-27 02:07:21 +03:00
levlam
74fbe7f549 Add businessInfo.away_message_settings. 2024-02-27 01:58:14 +03:00
levlam
72a4cd0398 Add td_api::businessInfo. 2024-02-26 23:09:52 +03:00
levlam
0636fb180e Reload userFull after User.is_premium changes. 2024-02-26 22:43:17 +03:00
levlam
5bde9c6fb6 Add td_api::businessAwayMessageSettings. 2024-02-26 20:27:17 +03:00
levlam
4c469a3f2c Add td_api::BusinessAwayMessageSchedule. 2024-02-26 20:15:16 +03:00
levlam
3d43bbb80d Add td_api::businessGreetingMessageSettings. 2024-02-26 19:09:58 +03:00
levlam
bdb3088a0c Add quickReplyShortcut.id. 2024-02-26 18:18:53 +03:00
levlam
b84c36626a Move public BusinessWorkHours fields before private one. 2024-02-26 17:06:29 +03:00
levlam
4513cf75b8 Add td_api::businessRecipients. 2024-02-26 16:35:20 +03:00
levlam
7476ff34de Combine local and server shortcuts by name. 2024-02-26 13:48:19 +03:00
levlam
693bb5f09e Add td_api::reorderQuickReplyShortcuts. 2024-02-24 14:40:25 +03:00
levlam
bf01eb3b91 Add and use QuickReplyManager::is_shortcut_list_changed. 2024-02-24 14:22:01 +03:00
levlam
bf825d76cb Don't invoke quick reply queries simultaneously. 2024-02-24 13:42:34 +03:00
levlam
2c8c883fbf Add and use QuickReplyManager::get_shortcut_it. 2024-02-24 13:37:02 +03:00
levlam
5ef3562533 Add QuickReplyShortcutId::is_server(). 2024-02-24 03:28:55 +03:00
levlam
817a64ce0e Add class QuickReplyShortcutId. 2024-02-24 03:16:56 +03:00
levlam
274720f395 Don't add back deleted shortcuts. 2024-02-24 03:06:20 +03:00
levlam
44366bd208 Add td_api::deleteQuickReplyShortcut. 2024-02-24 03:02:42 +03:00
levlam
370d862acf Support address-only business location. 2024-02-23 21:03:44 +03:00
levlam
6cecda5d40 Add quickReplyMessage.can_be_edited. 2024-02-23 20:22:33 +03:00
levlam
5d1dcd204d Add storers and parsers for quick reply shortcuts. 2024-02-23 16:17:37 +03:00
levlam
f0dcf7ebe2 Calculate quick reply shortcuts hash. 2024-02-23 14:49:29 +03:00
levlam
08084f35e3 Added updateChatAddedToList and updateChatRemovedFromList. 2024-02-23 13:38:51 +03:00
levlam
77abbdba60 Support telegram_api::updateDeleteQuickReply. 2024-02-22 23:17:02 +03:00
levlam
70b45fc3db Support telegram_api::updateNewQuickReply. 2024-02-22 23:14:08 +03:00
levlam
de8afdd0a8 Store separately server and local shortcut message total_count. 2024-02-22 23:08:38 +03:00
levlam
1d76beadeb Replace getQuickReplyShortcuts with loadQuickReplyShortcuts. 2024-02-22 23:04:36 +03:00
levlam
99f1369e8c Add updateQuickReplyShortcuts. 2024-02-22 22:55:09 +03:00
levlam
c73a19c319 Send update only if the first shortcut message changes. 2024-02-22 21:57:43 +03:00
levlam
9af1639168 Add QuickReplyManager::get_quick_reply_unique_id. 2024-02-22 21:47:34 +03:00
levlam
f1fbd90ae6 Add QuickReplyMessageUniqueId typedef. 2024-02-22 21:44:13 +03:00
levlam
d478ba05c4 Support edit date for quick replies. 2024-02-22 21:40:07 +03:00
levlam
d813b5c438 Support updateQuickReplyShortcut in getCurrentState. 2024-02-22 21:26:17 +03:00
levlam
6b97b9289e Add updateQuickReplyShortcut and updateQuickReplyShortcutDeleted. 2024-02-22 21:23:19 +03:00
levlam
dbc7bddf80 Support updateQuickReplies. 2024-02-22 20:12:06 +03:00
levlam
c42a9d5652 Merge new received shortcut data with previously known data. 2024-02-22 19:45:49 +03:00
levlam
ef90da3fd1 Update shortcut message count with the number of known messages. 2024-02-22 18:47:01 +03:00
levlam
96ddf0441c Add td_api::getQuickReplyShortcuts. 2024-02-22 17:32:12 +03:00
levlam
a92c34fe30 Remove self_destruct_type from QuickReplyMessage. 2024-02-22 00:48:05 +03:00
levlam
4fff9a0417 Add td_api::quickReplyMessage. 2024-02-21 22:43:29 +03:00
levlam
768afb8815 Keep only reply_to_message_id for quick replies. 2024-02-21 22:27:46 +03:00
levlam
e8f58d7dd4 Add class QuickReplyMessage. 2024-02-21 22:06:07 +03:00
levlam
094066eceb Add QuickReplyManager. 2024-02-21 20:43:55 +03:00
levlam
94ae90dcaf Check that quick reply messages aren't received by MessagesManager. 2024-02-21 20:36:33 +03:00
levlam
5097989a4d Add td_api::setBusinessWorkHours. 2024-02-20 15:55:17 +03:00
levlam
ea58ed8831 Add userFullInfo.business_work_hours. 2024-02-20 15:22:02 +03:00
levlam
8d9edcb31d Add td_api::setBusinessLocation. 2024-02-20 12:49:30 +03:00
levlam
9c51809490 Add userFullInfo.business_location. 2024-02-20 00:33:40 +03:00
levlam
d5af2f6ced Save time zones to binlog. 2024-02-19 22:30:07 +03:00
levlam
ab1b7cf20f Add td_api::getTimeZones. 2024-02-19 22:12:28 +03:00
levlam
552e6ba35a Add TimeZoneManager. 2024-02-19 14:34:28 +03:00
levlam
dc2300d7ae Update layer to 176. 2024-02-19 14:07:10 +03:00
levlam
1c06f69a03 Move on_view_dialog_active_stories to StoryManager. 2024-03-06 14:46:52 +03:00
levlam
0e8f076bab Move is_dialog_info_received_from_server to DialogManager. 2024-03-05 12:47:42 +03:00
levlam
d66e3657a3 Move cached_channel_participants_ to DialogParticipantManager. 2024-03-04 03:16:20 +03:00
levlam
b788136508 Minor improvements. 2024-03-03 02:14:53 +03:00
levlam
1e8e2fcecc Move search_among_dialogs to DialogParticipantManager. 2024-03-03 01:43:42 +03:00
levlam
958f6ddffd Add ContactsManager::get_user_was_online. 2024-03-03 01:39:00 +03:00
levlam
854b054ed6 Fix default parameter value. 2024-03-03 01:35:17 +03:00
levlam
22d9c86b57 Move get_channel_participants to DialogParticipantManager. 2024-03-03 01:22:49 +03:00
levlam
6399c64252 Drop username if it is invalid. 2024-03-03 00:41:09 +03:00
levlam
d809329044 Combine resolveUsername queries. 2024-03-03 00:39:11 +03:00
levlam
3d9d6f51f4 Move search_chat_participants to DialogParticipantManager. 2024-03-02 03:02:34 +03:00
levlam
82e109a4d5 Simplify search_private_chat_participants. 2024-03-02 02:09:56 +03:00
levlam
465fdd8505 Move search_dialog_participants to DialogParticipantManager. 2024-03-02 02:02:01 +03:00
levlam
29a8e8062b Don't use std::map and Container to store DC OptionStat. 2024-03-01 14:01:10 +03:00
levlam
f8342527ca Don't resave DcOptions on launch. 2024-02-28 13:47:17 +03:00
levlam
36e95649cc Make AuthData the last field of Session. 2024-02-27 13:51:39 +03:00
levlam
555aa71f59 Move chat ownership transfer to DialogParticipantManager. 2024-02-26 14:14:54 +03:00
levlam
49674bb431 Move methods for chat participant changes to DialogParticipantManager. 2024-02-25 00:45:19 +03:00
levlam
3d80f1ae6f Move get_dialog_search_text to DialogManager. 2024-02-24 23:47:30 +03:00
levlam
899587e4fa Add and use is_editable_message_content. 2024-02-23 20:19:54 +03:00
levlam
fe6201556b Fix GCC 4.9 compilation errors. 2024-02-22 13:08:31 +03:00
levlam
0862f03be2 Don't mark FolderId constructor as constexpr. 2024-02-22 01:12:50 +03:00
levlam
fe749cfb9b Add DialogManager::set_dialog_location. 2024-02-20 00:43:04 +03:00
levlam
da979c4631 Move user_online_member_dialogs_ to DialogParticipantManager. 2024-02-19 02:15:05 +03:00
levlam
59b1d7a4f6 Add ContactsManager::update_chat_online_member_count(ChatId). 2024-02-19 01:46:57 +03:00
levlam
32040c22cb Move get_dialog_about to DialogManager. 2024-02-19 01:10:57 +03:00
levlam
5828e46046 Don't subscribe to some state changes by bots. 2024-02-19 00:23:46 +03:00
levlam
acef6e61a0 Check close_flag() first. 2024-02-18 20:55:41 +03:00
levlam
b6b5b1b9ed Don't set network type if network statistics is disabled. 2024-02-17 21:39:12 +03:00
levlam
d93a99e335 Update version to 1.8.25. 2024-02-16 01:00:29 +03:00
levlam
5b9c066b34 Add binlog_ null checks. 2024-02-15 19:54:14 +03:00
levlam
e12b13bbb0 Keep reference to Td in TdDb::open to ensure that it isn't closed completely in the meanwhile. 2024-02-15 19:45:27 +03:00
levlam
6707463e85 Don't check ChannelFull for bots. 2024-02-15 18:47:20 +03:00
levlam
da5ba34850 Minor fixes. 2024-02-15 17:19:19 +03:00
levlam
78f3363486 Add key validness checks before adding to FlatHashSet. 2024-02-15 17:16:08 +03:00
levlam
0369a1a185 Check options in alphabetical order. 2024-02-15 16:32:03 +03:00
levlam
82e3cef939 Ignore duplicate animations in premium state. 2024-02-15 12:05:00 +03:00
levlam
862497601e Fix chatEventStickerSetChanged. 2024-02-14 18:02:48 +03:00
levlam
52c27fef85 Remove redundant logging. 2024-02-14 13:56:18 +03:00
levlam
e1098ef8e9 Allow empty non-null backgrounds in chat event log. 2024-02-13 16:56:07 +03:00
levlam
4198bff4af Don't initialize story sender for anonymous administrators. 2024-02-13 14:17:47 +03:00
levlam
6dfdb00f85 Support messageActionBoostApply. 2024-02-13 13:45:40 +03:00
levlam
781c9f53cb Fix sender_id for yet unsent stories. 2024-02-13 13:41:51 +03:00
levlam
e978e86c50 Add more story_id checks. 2024-02-13 13:41:05 +03:00
levlam
0dc90cf820 Remove chat identifier from setStoryPrivacySettings. 2024-02-13 13:13:41 +03:00
levlam
e9c8fb8cb4 Ignore story privacy settings for channel stories. 2024-02-13 13:07:09 +03:00
levlam
1c40ce963c Reload chats to send stories after updating the list locally to restore correct order. 2024-02-13 12:55:07 +03:00
levlam
638e5e5d8c Update default list of Premium features. 2024-02-13 00:10:54 +03:00
levlam
6b0262e9f7 Increase appConfig version. 2024-02-12 23:37:18 +03:00
levlam
0bdc409212 Add td_api::premiumFeatureLastSeenTimes. 2024-02-12 23:32:01 +03:00
levlam
b9de5cd0f9 Add td_api::premiumFeatureMessagePrivacy. 2024-02-12 23:27:44 +03:00
levlam
02d1cef461 Fix handling of 0 min boost level. 2024-02-12 22:59:12 +03:00
levlam
9a9ffa6794 Add and use can_change_info_and_settings_as_administrator. 2024-02-12 18:48:14 +03:00
levlam
9e32ab8ad1 Improve can_change_info right documentation. 2024-02-12 18:00:38 +03:00
levlam
46f076f47c Add td_api::setSupergroupUnrestrictBoostCount. 2024-02-12 17:42:35 +03:00
levlam
9d0ca2670e Add story.sender_id. 2024-02-12 16:12:29 +03:00
levlam
978cd5ef34 Support replying of supergroup stories in the supergroup. 2024-02-11 02:57:08 +03:00
levlam
e62f612c36 Add Message.sender_boost_count. 2024-02-11 02:45:18 +03:00
levlam
539fd729ea Allow stories administrator rights in supergroups. 2024-02-11 02:16:25 +03:00
levlam
81f959be99 Support supergroups in getChatBoostFeatures, 2024-02-11 01:29:07 +03:00
levlam
1728dbf561 Add rights check in get_background_dialog. 2024-02-10 23:53:44 +03:00
levlam
3745632f68 Support setChatEmojiStatus in supergroups. 2024-02-10 23:39:02 +03:00
levlam
75a812ba10 Support change of profile accent color in supergroups. 2024-02-09 16:54:16 +03:00
levlam
e12a1550d9 More precise check in can_use_premium_custom_emoji. 2024-02-09 16:20:13 +03:00
levlam
2220d6bd32 Poll active stories in supergroups. 2024-02-09 15:40:17 +03:00
levlam
423688771d Support gift codes in supergroups. 2024-02-09 14:54:57 +03:00
levlam
49003c5cce Generate boost links for supergroups and in new format, 2024-02-09 14:39:35 +03:00