Commit Graph

3424 Commits

Author SHA1 Message Date
levlam
1c53d32aba Return default tag reactions first for tags. 2024-01-23 16:49:50 +03:00
levlam
e6611cdb8f Add td_api::searchSavedMessages. 2024-01-22 21:14:02 +03:00
levlam
e8f96d2520 Support adding tags to a message. 2024-01-22 20:25:19 +03:00
levlam
61277da56f Move message_id checks to get_message_active_reactions. 2024-01-22 20:15:02 +03:00
levlam
b9afcbb70c Support reaction tags in getMessageAvailableReactions. 2024-01-22 20:03:05 +03:00
levlam
eb80098431 Add td_api::messageReactions and messageReactions.are_tags. 2024-01-22 19:37:05 +03:00
levlam
20c4815a12 Add td_api::setPinnedSavedMessagesTopics. 2024-01-18 19:38:26 +03:00
levlam
af43242ca7 Add td_api::toggleSavedMessagesTopicIsPinned. 2024-01-18 19:22:31 +03:00
levlam
ae7e290789 Add td_api::updatePinnedSavedMessagesTopics. 2024-01-18 18:51:34 +03:00
levlam
643b896958 Add td_api::premiumLimitTypePinnedSavedMessagesTopicsCount. 2024-01-18 18:34:39 +03:00
levlam
30dad21fae Add MessagesManager::fix_delete_message_min_max_dates. 2024-01-18 17:47:59 +03:00
levlam
8c358a4fc5 Add SavedMessagesTopicId::is_valid_status. 2024-01-18 17:38:15 +03:00
levlam
788d169e69 Add td_api::deleteSavedMessagesTopicMessagesByDate. 2024-01-18 17:29:09 +03:00
levlam
5002f25c0a Add td_api::getSavedMessagesTopicMessageByDate. 2024-01-18 16:45:45 +03:00
levlam
93370af38d Add td_api::deleteSavedMessagesTopicHistory. 2024-01-16 22:42:43 +03:00
levlam
40f8bffec8 Add td_api::getSavedMessagesTopicHistory. 2024-01-16 19:19:38 +03:00
levlam
d9f2fe57a6 Add td_api::getPinnedSavedMessagesTopics. 2024-01-16 17:32:11 +03:00
levlam
79a66c06cc Add td_api::getSavedMessagesTopics. 2024-01-16 16:26:58 +03:00
levlam
16fc47fb88 Add getChatSparseMessagePositions.saved_messages_topic. 2024-01-16 14:12:57 +03:00
levlam
f76c384f90 Add getChatMessageCalendar.saved_messages_topic. 2024-01-16 14:00:14 +03:00
levlam
8f019eeb73 Add getChatMessageCount.saved_messages_topic. 2024-01-16 00:30:37 +03:00
levlam
7e3107b1d3 Add SavedMessagesTopicId::is_valid_in. 2024-01-15 23:25:51 +03:00
levlam
3eba7d4f2b Add getChatMessagePosition.saved_messages_topic. 2024-01-15 20:39:47 +03:00
levlam
7d71562a24 Add searchChatMessages.saved_messages_topic_id. 2024-01-15 19:43:03 +03:00
levlam
341b59cb6c Duplicate fields from origin to source if appropriate. 2024-01-15 18:56:59 +03:00
levlam
85c4cd4642 Add SavedMessagesTopicId class. 2024-01-13 12:06:31 +03:00
levlam
0aeb11dee8 Add message.saved_messages_topic. 2024-01-12 16:06:10 +03:00
levlam
09e0add01f Add Message.saved_messages_dialog_id. 2024-01-12 15:38:12 +03:00
levlam
2ff04387b8 Add more information to forwardSource. 2024-01-12 00:23:33 +03:00
levlam
1dca0272be Add class LastForwardedMessageInfo. 2024-01-11 22:33:12 +03:00
levlam
10f77aee95 Move get_dialog_reply_markup implementation to ReplyMarkup.cpp. 2024-01-11 20:35:02 +03:00
levlam
645102e4ed Make MessageForwardInfo fields private. 2024-01-11 20:13:43 +03:00
levlam
6b180bcfd9 Add MessageForwardInfo::copy_message_forward_info. 2024-01-11 20:10:14 +03:00
levlam
c30c6168b5 Add and use MessageForwardInfo::need_change_warning. 2024-01-11 19:59:14 +03:00
levlam
edb02aa4c4 Add MessageForwardInfo::is_imported(). 2024-01-11 19:39:32 +03:00
levlam
8c6024808a Add and use MessagesManager::get_message_original_date. 2024-01-11 19:36:00 +03:00
levlam
b3a94f187f Use public constructor to create legacy-parsed MessageForwardInfo. 2024-01-11 19:29:49 +03:00
levlam
5ccb67f28e Improve MessageForwardInfo field names. 2024-01-11 19:24:01 +03:00
levlam
d59abc099d Add MessageForwardInfo getters. 2024-01-11 19:11:16 +03:00
levlam
3ba660a655 Add some MessageForwardInfo methods. 2024-01-11 18:46:10 +03:00
levlam
3cb8ef9807 Store MessageForwardInfo as the whole. 2024-01-11 18:20:53 +03:00
levlam
8e2ef00696 Apply message self-destruct type changes for being sent messages. 2024-01-02 15:38:43 +03:00
levlam
139b61e4b6 Add td_api::messageExpiredVideoNote and td_api::messageExpiredVoiceNote. 2024-01-02 14:27:11 +03:00
levlam
be8b21cdf4 Update layer to 171. 2024-01-02 03:23:51 +03:00
levlam
2b0d3f6091 Improve error message. 2024-01-25 17:33:11 +03:00
levlam
09c6bad8bd Remove pinned message notification only if new pinned message is added to Mentions. 2024-01-20 03:30:10 +03:00
levlam
2a9393ff7a Add "process_pinned_messages_as_mentions" option to allow keep previous behavior. 2024-01-19 22:23:26 +03:00
levlam
121fbe535f Create dependent chats right after Message object creation. 2024-01-18 15:21:44 +03:00
levlam
021c0bd02d Improve logging. 2024-01-18 14:59:53 +03:00
levlam
14c93b1772 Fix added_message_full_id initialization. 2024-01-16 21:40:25 +03:00
levlam
6d910597e5 Delete message from map after using. 2024-01-16 21:36:24 +03:00
levlam
0aa8816c28 Don't always treat pins as mentions. 2024-01-12 18:15:19 +03:00
levlam
4bafdc2b71 Fix MessagesManager::drop_dialog_last_pinned_message_id. 2024-01-12 12:16:51 +03:00
levlam
21418140bd Fix removal of message reply for failed to send forwarded messages. 2024-01-10 22:01:39 +03:00
levlam
17a412a04a Don't delete notifications when initializing last_new_message_id. There should be no old notifications anyway (2). 2024-01-10 21:08:43 +03:00
levlam
bc5b1f4e19 Remove unavailable messages from the list of linked messages. 2024-01-10 20:22:45 +03:00
levlam
faee94b680 Apply message auto-delete time from chat creation message. 2024-01-10 17:20:13 +03:00
levlam
4d51b2c875 Move create_new_chat/create_new_channel to ContactsManager. 2024-01-10 17:09:09 +03:00
levlam
a409af0973 Move migrate_dialog_to_megagroup to ContactsManager. 2024-01-10 15:57:19 +03:00
levlam
1bc8e90c10 Move create_new_secret_chat to ContactsManager. 2024-01-10 15:20:16 +03:00
levlam
c6154c43aa Don't store message interaction info for bots. 2024-01-09 10:59:24 +03:00
levlam
7b6ce8b822 Move reload_dialog_info to DialogManager. 2024-01-08 19:20:22 +03:00
levlam
466c841b4e Move send_update_add_chat_members_privacy_forbidden to DialogParticipantManager. 2024-01-08 18:57:44 +03:00
levlam
b579fcd3e0 Rename DialogOnlineMemberManager to DialogParticipantManager. 2024-01-08 14:22:44 +03:00
levlam
b4ac2653cd Move delete_dialog to DialogManager. 2024-01-08 01:27:49 +03:00
levlam
a2c6f4aa7c Move resolved usernames to DialogManager. 2024-01-07 23:45:33 +03:00
levlam
b684039566 Move some methods to DialogActionManager. 2024-01-07 00:46:36 +03:00
levlam
bd7f900df8 Move relevant methods to MessageImportManager. 2024-01-06 22:45:27 +03:00
levlam
884a16f1ed Partly move report_dialog to DialogManager. 2024-01-04 22:46:13 +03:00
levlam
c24bd49cce Move set_dialog_photo to DialogManager. 2024-01-04 20:44:12 +03:00
levlam
e5f0b33508 Move toggle_dialog_has_protected_content to DialogManager. 2024-01-04 20:25:41 +03:00
levlam
17012dff1c Move set_dialog_permissions to DialogManager. 2024-01-04 20:20:18 +03:00
levlam
fd45eb84f5 Move set_dialog_title to DialogManager. 2024-01-04 20:15:29 +03:00
levlam
57f1b32617 Move remove_secret_chat_dialog_ids to DialogId. 2024-01-04 19:55:48 +03:00
levlam
c0a0f7de07 Move on_dialog_info_full_invalidated to DialogManager. 2024-01-04 19:52:31 +03:00
levlam
a719ed42be Simplify conditions for reloading chat full info. 2024-01-04 19:47:27 +03:00
levlam
249598a711 Move get_common_dialogs to CommonDialogManager. 2024-01-04 19:30:58 +03:00
levlam
f43807ebbf Don't try to remove chat from recent for bots. 2024-01-04 19:06:50 +03:00
levlam
3003679192 Move online member count to DialogOnlineMemberManager. 2024-01-04 18:30:12 +03:00
levlam
52b8e295ca Minor include improvements. 2024-01-04 16:46:53 +03:00
levlam
6d1f6e250f Add DialogManager::is_dialog_removed_from_dialog_list. 2024-01-04 16:32:04 +03:00
levlam
d24a0eda1d Move get_peers_dialog_ids to DialogManager. 2024-01-04 16:24:19 +03:00
levlam
b97fa08e62 Move get_input_dialog_id to DialogManager. 2024-01-04 16:20:15 +03:00
levlam
32898dbe88 Move get_chat_ids_object and get_chats_object to DialogManager. 2024-01-04 16:13:20 +03:00
levlam
ebda6f1364 Use DialogManager::get_my_dialog_id. 2024-01-04 15:49:02 +03:00
levlam
b2fccc7d9c Move ContactsManager proxy methods to DialogManager. 2024-01-03 23:07:50 +03:00
levlam
d963044eb9 Update copyright year. 2024-01-01 03:07:21 +03:00
levlam
6d79dd9ea8 Keep forward info for audios and stories forwarded to saved messages. 2023-12-30 22:14:50 +03:00
Fela
c73222b33b Pass is_pinned while creating event log messages 2023-12-29 13:51:24 +03:00
levlam
07bf49d42e Improve logging in need_channel_difference_to_add_message. 2023-12-26 15:54:40 +03:00
levlam
8900038324 Add and use generic MessagesManager::get_channel_differences_if_needed. 2023-12-26 12:02:53 +03:00
levlam
c4efc0e2e0 Add td_api::setChatEmojiStatus. 2023-12-25 14:49:22 +03:00
levlam
5979276116 Enable updateChatAvailableReactions for bots. 2023-12-25 02:50:20 +03:00
levlam
66c6e706ab Replase td_api::shareUserWithBot with td_api::shareUsersWithBot. 2023-12-22 18:47:23 +03:00
levlam
5cb6ca27cc Add Chat.emoji_status. 2023-12-21 20:01:26 +03:00
levlam
8e85ef9e40 Don't mark background as inited for channels. 2023-12-21 19:10:05 +03:00
levlam
14b81a2d48 Always apply background from new message in groups and channels. 2023-12-19 16:24:06 +03:00
levlam
855d6bf568 Support getPremiumGiveawayInfo for GiveawayWinners messages. 2023-12-19 13:07:41 +03:00
levlam
0b51acefe9 Add td_api::messagePremiumGiveawayWinners. 2023-12-18 21:03:11 +03:00
levlam
1393033fdf Add td_api::setChatProfileAccentColor. 2023-12-17 23:34:58 +03:00
levlam
7ceccad807 Support profile color and custom emoji in chat. 2023-12-17 22:54:55 +03:00
levlam
16d0c3c61b Use combined updateChatAccentColors. 2023-12-16 11:49:26 +03:00
levlam
c6ce44815e Update layer to 169. 2023-12-05 12:30:12 +03:00
levlam
3e42417a0f Log results of message deletion. 2023-12-22 16:31:53 +03:00
levlam
d60bb8da91 Add MessagesManager::update_replied_by_message_count. 2023-12-21 17:10:09 +03:00
levlam
bd1768954a Add and use MessagesManager::get_message_reply_to_random_id. 2023-12-20 23:25:54 +03:00
levlam
50f20c8a0c Assign message identifier in create_message_to_send. 2023-12-17 01:06:40 +03:00
levlam
2bf1dcd6eb Add source to get_channel_difference_if_needed. 2023-12-13 19:48:11 +03:00
levlam
44844e1c19 Improve link preview options comparison. 2023-12-07 21:16:37 +03:00
levlam
4ac5708135 Remove redundant is_valid checks before adding an identifier as dependency. 2023-12-04 22:18:08 +03:00
levlam
9a9e3be8cf Trim quote from the replied message. 2023-12-04 16:27:15 +03:00
levlam
1b42476416 Add sanity checks. 2023-12-04 11:39:48 +03:00
levlam
072f811a9c Apply chat background set by the other user. 2023-11-30 21:49:32 +03:00
levlam
6f3180aeaf Don't warn about pre-release messages. 2023-11-30 21:11:19 +03:00
levlam
9096e646b8 Minor improvements. 2023-11-30 18:26:33 +03:00
levlam
9bf9bf767d Add td_api::getStoryPublicForwards. 2023-11-30 17:21:56 +03:00
levlam
f792e9d45e Don't check permissions for added local messages. 2023-11-29 14:17:49 +03:00
levlam
ec98830565 Improve error messages. 2023-11-29 01:06:13 +03:00
levlam
c5288258d4 Add class inputTextQuote. 2023-11-28 18:16:04 +03:00
levlam
ec109dfd4a Move speech recognition to TranscriptionManager. 2023-11-23 13:25:56 +03:00
levlam
a2b133ead5 Add td_api::toggleChatViewAsTopics. 2023-11-16 16:57:18 +03:00
levlam
57e9a6c5f7 Send updateChatDraftMessage when view_as_topics changes. 2023-11-16 15:19:54 +03:00
levlam
3261d9d72c Store copy of Channel.is_forum in Dialog. 2023-11-16 15:04:57 +03:00
levlam
f13dde54a2 Add Chat.view_as_topics. 2023-11-16 13:59:32 +03:00
levlam
95304c611c Support quote position for replies. 2023-11-10 13:29:37 +03:00
levlam
9c88451e1c Add td_api::messagePremiumGiveawayCompleted. 2023-11-09 20:28:27 +03:00
levlam
d20ed201b0 Update layer to 167. 2023-11-09 19:37:26 +03:00
levlam
e58847a5fb Allow toggleChatIsTranslatable for non-premium users. 2023-11-25 22:01:51 +03:00
levlam
499d4eaf54 Minor improvements. 2023-11-23 08:31:56 +03:00
levlam
3e3fe5f9bb Improve ChatReactions field names. 2023-11-19 02:03:19 +03:00
levlam
8d1262ca6a Add source to run_after_channel_difference. 2023-11-17 17:42:28 +03:00
levlam
0e8d062090 Fix handling of ToggleDialogIsTranslatableOnServer log events. 2023-11-16 16:38:59 +03:00
levlam
6c8df6fa7f Improve is_content_read initialization. 2023-11-13 17:26:00 +03:00
levlam
9ab9680c21 Remove unneeded usernames.is_empty() checks. 2023-11-13 14:03:32 +03:00
levlam
dc481550de Don't get chat in on_dialog_usernames_received for bots. 2023-11-13 13:33:23 +03:00
levlam
413556bab7 Add and use MessagesManager::on_get_message_error. 2023-11-12 22:55:48 +03:00
levlam
1d1d41e39e Update chat background only from outgoing messages. 2023-11-10 18:44:25 +03:00
levlam
ee25630c2b Delete duplicate of a just sent message before sending updateMessageSendSucceeded. 2023-11-10 18:43:04 +03:00
levlam
6ee64289f3 Fix MessagesManager::get_replied_message_id. 2023-11-09 18:23:36 +03:00
levlam
a538581a4b Return back is_topic_message change. 2023-11-09 02:06:43 +03:00
levlam
4ce900c5fd Improve draft message emptiness check. 2023-11-09 01:31:24 +03:00
levlam
7039272ae8 Add source to reload_user/chat/channel. 2023-11-08 23:48:27 +03:00
levlam
21d5184e9f Improve RepliedMessageInfo::get_same_chat_reply_to_message_id. 2023-11-07 03:43:48 +03:00
levlam
08359b46fc Improve RepliedMessageInfo::get_reply_message_full_id. 2023-11-07 02:48:01 +03:00
levlam
c886e4f3c8 Don't get channel difference before adding messages for bots. 2023-11-07 02:16:36 +03:00
levlam
baed5606fb Prevent unloading of replied polls. 2023-11-06 20:37:17 +03:00
levlam
da461f5da2 Register replies for yet unsent forwarded messages with external replies. 2023-11-06 19:15:47 +03:00
levlam
aba3f38a2f Add RepliedMessageInfo::legacy static function instead of legacy constructors. 2023-11-06 18:29:47 +03:00
levlam
728e2e18ee Add messageSendingStateFailed.need_drop_reply. 2023-11-06 15:08:28 +03:00
levlam
8bd5f61ee7 Improve documentation spelling. 2023-11-06 13:31:30 +03:00
levlam
8228c2e7b6 Allow to change reply quote in resendMessages. 2023-11-06 13:20:16 +03:00
levlam
0139e73910 Reload replied message when receiving QUOTE_TEXT_INVALID. 2023-11-06 12:50:26 +03:00
levlam
e7f70d0e09 Add messageSendingStateFailed.need_another_reply_quote. 2023-11-06 12:42:06 +03:00
levlam
adc81fcea6 Fallback to default accent color for the chat. 2023-11-02 22:32:59 +03:00
levlam
00a6167952 Never send unknown accent color identifiers to the app. 2023-11-02 22:11:54 +03:00
levlam
1ca86b0c75 Fix message_id checks before accessing input_reply_to. 2023-11-01 22:39:35 +03:00
levlam
46d188e35c Return full link_preview_options in messageText. 2023-11-01 21:55:12 +03:00
levlam
37637bf9ed Preload chat to which belongs the replied meessage from a draft. 2023-11-01 21:32:09 +03:00
levlam
36ce823dcc Add separate flag message.can_be_replied_in_another_chat. 2023-11-01 18:32:55 +03:00
levlam
0e0d6dd5eb Call hide_sender_if_needed immediately after origin creation. 2023-11-01 18:25:44 +03:00
levlam
887fd06e1c Keep external replies when forwarding a message. 2023-11-01 17:14:35 +03:00
levlam
6c1fb4fe57 Postpone adding of draft message to loaded from database chat. 2023-11-01 15:19:03 +03:00
levlam
0bbd41a5d5 Store directly pending_order in Dialog. 2023-11-01 15:02:32 +03:00
levlam
95cf186fe6 Call on_dialog_updated and send_update_chat_draft_message independently. 2023-10-31 23:37:40 +03:00
levlam
740c001ff3 Add struct AddDialogData. 2023-10-31 23:24:28 +03:00
levlam
0e2300e1fa Add warning when reply quote changes. 2023-10-31 18:20:55 +03:00
levlam
5b2dd42e58 Init RepliedMessageInfo fields for sent replies to messages in other chats. 2023-10-29 22:14:41 +03:00
levlam
0ad0f7cdcc Improve function and parameters names. 2023-10-29 22:05:23 +03:00
levlam
77fa45c72c Add MessagesManager::get_message_forward_origin. 2023-10-29 20:40:36 +03:00
levlam
9a66b6ec5c Disallow quotes and replies in other chats in secret chats. 2023-10-29 20:08:59 +03:00
levlam
7f5b50db9b Disallow to reply unknown messages in another chat. 2023-10-29 02:05:08 +03:00
levlam
7f5da4b5c5 Don't allow to reply in another chat non-forwardable messages. 2023-10-29 01:05:55 +03:00
levlam
6e217d1aac Add inputMessageReplyToMessage.chat_id. 2023-10-29 00:50:33 +03:00
levlam
eec35cf63e Init reply_to_random_id for scheduled messages. 2023-10-28 22:21:13 +03:00
levlam
8a17168315 Disable separate notification for messageGiveawayLaunch. 2023-10-28 20:46:14 +03:00
levlam
8adea20fd3 Keep quote when forwarding replies. 2023-10-27 14:33:15 +03:00
levlam
012211ea19 Pass MessageInputReplyTo to set_message_reply. 2023-10-27 13:33:00 +03:00
levlam
ec231f0c99 Add inputMessageReplyToMessage.quote. 2023-10-27 13:06:38 +03:00
levlam
d43fd3beb3 Disallow MessageInputReplyTo copying. 2023-10-27 03:37:26 +03:00
levlam
6517d6b9db Don't copy get_message_input_reply_to return value. 2023-10-27 03:27:03 +03:00
levlam
a92b2fec1d Make MessageInputReplyTo fields private. 2023-10-27 03:03:52 +03:00
levlam
10e2decf4b Add and use RepliedMessageInfo::get_file_ids. 2023-10-27 01:50:32 +03:00
levlam
5b9731a974 Support RepliedMessageInfo in *FromMessage. 2023-10-27 01:41:15 +03:00
levlam
9260d38618 Support giveaway channels in *ChannelFromMessage. 2023-10-27 00:34:33 +03:00
levlam
8128c6e079 Reget message if reply contains MessageUnsupported. 2023-10-26 23:16:06 +03:00
levlam
e50a3ce18c Add messageReplyToMessage.content. 2023-10-26 22:53:25 +03:00
levlam
e113fb47f1 Add compare_message_contents function. 2023-10-26 18:50:16 +03:00
levlam
10c9e400d3 Rename MessageForwardOrigin to MessageOrigin. 2023-10-26 16:26:52 +03:00
levlam
3531481591 Store RepliedMessageInfo in Message. 2023-10-26 14:51:32 +03:00
levlam
e4ffed5752 Move other reply_to_message_id checks to ReplyHeader parsing. 2023-10-25 16:46:17 +03:00
levlam
bd923a36eb Check top_thread_message_id during object parsing. 2023-10-25 16:14:36 +03:00
levlam
27b9ad4526 Store MessageInputReplyTo in Message. 2023-10-25 13:07:25 +03:00
levlam
5216ea1d01 Use InputMessageReplyTo in draftMessage. 2023-10-25 02:07:37 +03:00
levlam
4425eadc3c Pass default DialogId to get_reply_message_full_id. 2023-10-24 18:54:32 +03:00
levlam
cb70dd7831 Add class RepliedMessageInfo. 2023-10-24 12:04:45 +03:00
levlam
abca2962f2 Parse new MessageReplyHeader. 2023-10-23 20:54:47 +03:00
levlam
4027e73309 Support only_preview in sendInlineQueryResultMessage. 2023-10-23 18:58:53 +03:00
levlam
2c464baae1 Support only_preview in sendMessage. 2023-10-23 18:47:31 +03:00
levlam
faf964a10d Move only_preview to messageSendOptions. 2023-10-23 18:40:55 +03:00
levlam
2bbb0ed0ec Add linkPreviewOptions.show_above_text. 2023-10-22 00:50:19 +03:00