Commit Graph

3054 Commits

Author SHA1 Message Date
levlam
280209a220 Self-destruct media in private chats when they expire on the other side. 2023-09-07 00:31:05 +03:00
levlam
5ebbda1c26 Add td_api::MessageSelfDestructType. 2023-09-06 21:27:45 +03:00
levlam
aec04a2d01 Support immediately disappearing photos and videos. 2023-09-06 20:45:15 +03:00
levlam
745adb7c52 Add some logging. 2023-09-11 15:09:24 +03:00
levlam
40973f0977 Start chat unload timer when the first message is added to the chat, if it is definitely not the last database message. 2023-09-11 00:14:58 +03:00
levlam
249da789e7 Add messageBotWriteAccessAllowed.by_request. 2023-08-25 16:53:50 +03:00
levlam
917c9dc013 Add ForumTopicManager::read_forum_topic_messages. 2023-09-04 15:34:54 +03:00
levlam
1a2bfad094 Move message content self-destruct time checks to create_input_message_content. 2023-08-29 18:51:57 +03:00
levlam
04b376782c Improve field name. 2023-08-27 02:48:18 +03:00
levlam
1dcd78f1ed Add source to have_dialog_info_force. 2023-08-26 05:00:15 +03:00
levlam
c83149661b Remove useless checks. 2023-08-26 04:38:33 +03:00
levlam
432f77ae85 Use NotificationObjectId in NotificationGroupInfo. 2023-08-26 00:48:57 +03:00
levlam
4455255d9b Add class NotificationObjectId. 2023-08-25 02:04:44 +03:00
levlam
a85d3663bf Add MessagesManager::reload_dialog_notification_settings. 2023-08-24 17:29:22 +03:00
levlam
1e6970e3fe Add NotificationGroupFromDatabase struct. 2023-08-23 19:38:06 +03:00
levlam
fbc74dc8f4 Add and use NotificationManager::have_group_force. 2023-08-23 19:16:57 +03:00
levlam
2fc806785f Use CHECK in MessagesManager::get_dialog_notification_group_id. 2023-08-23 18:54:03 +03:00
levlam
d8472358dc Add MessagesManager::get_story_notification_settings. 2023-08-22 18:55:59 +03:00
levlam
15c14e4983 Use object_id instead of message_id in NotificationGroupInfo. 2023-08-22 16:32:40 +03:00
levlam
ce1fdf097c Add NotificationGroupInfo.has_group_id. 2023-08-22 02:34:26 +03:00
levlam
5144656f2b Add MessagesManager::is_dialog_notification_group_id. 2023-08-22 02:31:47 +03:00
levlam
1289a62c16 Make the rest NotificationGroupInfo fields private. 2023-08-22 00:01:29 +03:00
levlam
db9ca1a847 Add NotificationGroupInfo::is_valid(). 2023-08-21 23:03:55 +03:00
levlam
a93322ae32 Always remove unneeded last_notification_id_. 2023-08-21 22:40:17 +03:00
levlam
8116952371 Make NotificationGroupInfo.last_notification_date_ private. 2023-08-21 22:21:06 +03:00
levlam
5450d2e53d Make NotificationGroupInfo.::max_removed_notification_id_ private. 2023-08-21 22:13:19 +03:00
levlam
4e031ed7fd Make NotificationGroupInfo.max_removed_message_id_ private. 2023-08-21 21:43:26 +03:00
levlam
c40b2b95d2 Add NotificationGroupInfo::is_removed_notification. 2023-08-21 21:37:52 +03:00
levlam
f933f5a25f Add NotificationGroupInfo::set_max_removed_notification_id. 2023-08-21 20:12:30 +03:00
levlam
d22fbcaba6 Add NotificationGroupInfo constructors. 2023-08-21 19:54:12 +03:00
levlam
174f0ca5f5 Add MessagesManager::set_dialog_last_notification_checked. 2023-08-21 19:50:24 +03:00
levlam
e667e45985 Add NotificationGroupInfo::set_last_notification. 2023-08-21 19:46:09 +03:00
levlam
05b1bec6a9 Improve names of NotificationGroupInfo fields. 2023-08-21 19:36:43 +03:00
levlam
6c4545fb3f Make NotificationGroupInfo::try_reuse_ private. 2023-08-21 19:28:05 +03:00
levlam
d2cf780a1f Move class NotificationGroupInfo to a separate header. 2023-08-21 18:52:56 +03:00
levlam
74f0d49f8e Support only Main and Archive folder identifiers. 2023-08-18 17:51:31 +03:00
levlam
c8cbef60cb Save correct chat order even we aren't sure about chat folder. 2023-08-18 16:19:22 +03:00
levlam
770837bcd9 Update chat action bar only if folder_id is changed. 2023-08-18 15:56:12 +03:00
levlam
8d0627b014 Disallow story areas editing without content edit. 2023-08-15 19:39:59 +03:00
levlam
5a60e62892 Add more checks. 2023-08-15 17:55:12 +03:00
levlam
ba527b7e5d Create channel chat to apply an update, even the update will be ignored. 2023-08-15 15:03:13 +03:00
levlam
4f2ad215d3 Initialize PTS in channels from the first received update. 2023-08-15 14:53:14 +03:00
levlam
b12ade01f6 Add more checks for server StoryId. 2023-08-10 20:22:12 +03:00
levlam
6c0878e738 Simplify condition. 2023-08-09 14:56:28 +03:00
levlam
ec6c36e578 Add getBlockedMessageSenders.block_list. 2023-07-28 17:52:44 +03:00
levlam
3794e65b76 Add td_api::BlockList. 2023-07-28 17:33:47 +03:00
levlam
f0e59da1ff Process blocked_my_stories_from flags. 2023-07-28 16:19:05 +03:00
levlam
1022cc6439 Update layer to 161. 2023-07-21 15:41:44 +03:00
levlam
441482c0c4 Remove now unneeded proxies to ReactionManager. 2023-08-09 13:10:06 +03:00
levlam
9dcfd9d66d Add ReactionManager and move there all reaction-related methods from StickersManager. 2023-08-09 12:59:48 +03:00
levlam
d2add02ac9 Move get_sorted_available_reactions to StickersManager. 2023-08-09 12:07:13 +03:00
levlam
39103e07db Add ChatReactions.hpp. 2023-08-06 02:32:09 +03:00
levlam
3fa863e98e Fix misprint. 2023-08-06 01:57:08 +03:00
levlam
830da27abf Minor improvements. 2023-08-05 15:31:42 +03:00
levlam
5558825d61 Add class ReactionType. 2023-08-04 18:39:07 +03:00
levlam
50a0c551cd Remove duplicate check. 2023-08-03 15:06:44 +03:00
levlam
ff3a8e446e Add MessagesManager::load_last_dialog_message instead of get_history_from_the_end. 2023-07-28 14:33:54 +03:00
levlam
58a1ae8e8d Directly call get_history_impl if appropriate. 2023-07-28 14:19:43 +03:00
levlam
f5a066f7ed Support loading of history from the end in get_history_impl. 2023-07-28 14:12:22 +03:00
levlam
73d5b2dcbb Simplify calls to load_messages. 2023-07-28 13:50:02 +03:00
levlam
c071678be1 Add source to MessagesManager::get_history_impl. 2023-07-28 13:32:07 +03:00
levlam
2dba29669f Delete unused MessagesManager::get_history. 2023-07-28 13:22:52 +03:00
levlam
16183df0aa Adjust offset and limit in get_history_impl. 2023-07-28 13:22:07 +03:00
levlam
bd0ca2d6fc Combine all getChatHistory queries. 2023-07-28 03:36:21 +03:00
levlam
9618d58732 Combine get_history_from_the_end queries. 2023-07-27 20:40:56 +03:00
levlam
5c8b12b105 Simplify limit initialization in get_history_from_the_end_impl. 2023-07-27 18:19:10 +03:00
levlam
1fbbecca9b Don't register message users/channels for bots. 2023-07-27 13:16:48 +03:00
levlam
5bc2634d12 Use FlatHashMap for random_id_to_message_id. 2023-07-26 13:38:10 +03:00
levlam
0edd5b1651 Support "CHANNEL_INVALID" errors in response to channels.getDifference. 2023-07-25 14:12:58 +03:00
levlam
5110a188b2 Improve MessageReplyInfo logging and updating. 2023-07-24 15:56:03 +03:00
levlam
62677720fc Immediately unload messages in closed chats after updates.channelDifferenceTooLong. 2023-07-24 15:42:38 +03:00
levlam
1f6342c88e Retry loading of channel difference later if receive invalid poll in a message. 2023-07-23 20:42:30 +03:00
levlam
451c559539 Add various checks. 2023-07-23 01:41:59 +03:00
levlam
2f4b8ba8b3 Don't allow replies to supergroup creation message. 2023-07-22 23:07:51 +03:00
levlam
102222e64f Add source to on_update_channel_max_unavailable_message_id. 2023-07-22 22:40:26 +03:00
levlam
7498aad742 Improve handling of message reading up to unknown message. 2023-07-22 20:03:35 +03:00
levlam
ea848ff2e4 Fix MessagesManager::can_delete_dialog. 2023-07-22 19:58:26 +03:00
levlam
9bebe6dff6 Skip updateChannelTooLong in unknown chats. 2023-07-22 19:17:55 +03:00
levlam
ad8e887aae Keep error logging for invalid unread count only if the counters are recalculated. 2023-07-22 18:58:01 +03:00
levlam
02456042d6 Avoid expected error logging. 2023-07-22 16:38:56 +03:00
levlam
4984307f36 Improve logging. 2023-07-22 14:16:49 +03:00
levlam
240fbe5f36 Fix via_bot_user_id. 2023-07-21 14:49:12 +03:00
levlam
a3e277f7c0 Add source to get_user_force. 2023-07-20 20:38:25 +03:00
levlam
999aaaf610 Update username cache with usernames loaded from database. 2023-07-20 20:09:46 +03:00
levlam
b7551dab33 Poll maximum active story identifiers of non-contact users. 2023-07-18 13:53:22 +03:00
levlam
1b3d14a3f9 Add source to reload_user_full and reload_chat_full. 2023-07-17 18:22:41 +03:00
levlam
fc6ef9d590 Avoid expected error logging. 2023-07-13 21:55:53 +03:00
levlam
b9473decc2 Always list actor_id first in lambda capture. 2023-07-11 17:53:43 +03:00
levlam
3b28485a3f Always apply awaited sent messages. 2023-07-11 17:14:02 +03:00
levlam
bd6e6f28bc Fix handling of RegetDialogLogEvent. 2023-07-07 16:44:08 +03:00
levlam
0f8de6c91d Fix warnings. 2023-07-06 20:55:02 +03:00
levlam
aff810db0d Return back manual load_messages call if receive no messages from database to repair last message with a server-side request. 2023-07-06 01:20:34 +03:00
levlam
6ded199729 Load last chat messages if there are no known messages in the chat. 2023-07-06 01:09:32 +03:00
levlam
ad193a389c Add FileManager::get_missing_file_parts. 2023-07-05 10:55:16 +03:00
levlam
6b010c0207 Add more checks for chat existence before scheduling channel difference. 2023-07-04 15:52:06 +03:00
levlam
8d7ba4da1b Add source to schedule_get_channel_difference. 2023-07-04 15:23:39 +03:00
levlam
8bc4d800bb Forcely create all chats needed for a message before adding it. 2023-07-03 14:09:17 +03:00
levlam
9da2c92ff0 Fix source in add_message_to_dialog_message_list. 2023-07-03 13:47:08 +03:00
levlam
af9351bdfe Reload viewers of replied stories. 2023-07-02 19:10:40 +03:00
levlam
2bf47d0809 Minor fixes. 2023-07-01 16:22:01 +03:00