Commit Graph

1262 Commits

Author SHA1 Message Date
levlam
49a75ad084 Add source to QueryMerger::add_query. 2023-11-08 23:22:18 +03:00
levlam
776e992c45 Fix calls to on_update_channel_default_permissions. 2023-11-08 23:16:30 +03:00
levlam
a7c5b80b6d Use QueryMerger for getMe queries to combine them. 2023-11-08 17:25:41 +03:00
levlam
3d163e8fb2 Preload self user to process updateBotStopped. 2023-11-08 17:04:51 +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
d5d069416e Apply restrictions in channel chats. 2023-10-31 13:54:22 +03:00
levlam
43e210dbc8 Support AccentColor in MinChannel. 2023-10-20 12:25:58 +03:00
levlam
21ef7d0f6c Disallow restricted member status in channels. 2023-10-19 22:37:44 +03:00
levlam
edc3e4c18a Add chatInviteLinkInfo.accent_color_id_. 2023-10-19 15:40:55 +03:00
levlam
f78bc2ae32 Add td_api::setChatAccentColor. 2023-10-18 19:43:14 +03:00
levlam
28bdceaaef Add td_api::setAccentColor. 2023-10-18 17:56:45 +03:00
levlam
372f505d71 Support optional accent color. 2023-10-18 16:23:04 +03:00
levlam
7df8a8f3d0 Support user/chat.background_custom_emoji_id. 2023-10-18 15:59:25 +03:00
levlam
364b058508 Ignore invalid accent colors. 2023-10-18 13:33:44 +03:00
levlam
1b49787c88 Support accent color in channels. 2023-10-17 15:20:50 +03:00
levlam
dd6fd86637 Add chat.accentColorId. 2023-10-17 15:09:57 +03:00
levlam
b07818c160 Add user.accent_color_id. 2023-10-17 14:23:42 +03:00
levlam
22e4b0d641 Add class AccentColorId. 2023-10-17 13:52:04 +03:00
levlam
e556ed04a0 Add ContactsManager::can_use_premium_custom_emoji. 2023-10-17 01:25:58 +03:00
levlam
bd36f48054 Update layer to 166. 2023-09-28 16:13:36 +03:00
levlam
f0382d8789 Add source to get_chat_member_object. 2023-10-24 15:17:18 +03:00
levlam
605a3af4b2 Add and use td::any_of. 2023-10-21 20:41:31 +03:00
levlam
74679944af Remove error-prone server_time_cached. 2023-10-04 12:24:58 +03:00
levlam
a65f14fff6 Improve log messages. 2023-09-27 16:22:16 +03:00
levlam
ab673a959b Add some index checks. 2023-09-26 14:03:10 +03:00
levlam
235d884593 Improve can_manage_chat documentation. 2023-09-25 20:27:55 +03:00
levlam
1e2c0ce814 Rename FullMessageId to MessageFullId. 2023-09-21 19:11:17 +03:00
levlam
b4f6e716ac Add source to get_(chat|channel|secret_chat)_force. 2023-09-21 18:56:13 +03:00
levlam
c8e46cae53 Improve method names. 2023-09-21 14:53:33 +03:00
levlam
a2c8aa7165 Update channel participant count when receiving boost status. 2023-09-21 14:05:40 +03:00
levlam
246f2ca42f Recheck received from the server channels. 2023-09-20 20:34:21 +03:00
levlam
036f37fe43 Simplify ContactsManager::update_created_public_channels. 2023-09-20 19:53:42 +03:00
levlam
154b2cb315 Recheck loaded from database channels. 2023-09-20 19:51:17 +03:00
levlam
cd7d960ba4 Cache chats to send stories. 2023-09-20 19:07:51 +03:00
levlam
be63c46992 Move statistics related functions to StatisticsManager. 2023-09-19 21:40:29 +03:00
levlam
0e56b7e527 Clamp percentage value. 2023-09-19 21:15:10 +03:00
levlam
b42781a631 Update order of channel stories when they are joined or left. 2023-09-05 19:14:40 +03:00
levlam
e59a832e10 Use channel.stories_hidden_min flag. 2023-09-05 18:45:28 +03:00
levlam
b4c25af1b6 Update stories from channelFull. 2023-09-05 18:36:30 +03:00
levlam
de204f7bf2 Add supergroupFullInfo.has_pinned_stories. 2023-09-05 18:34:06 +03:00
levlam
f2a821a07e Support archiving channel stories. 2023-09-05 18:17:45 +03:00
levlam
35a319db20 Poll channel max active story identifiers. 2023-09-05 17:41:33 +03:00
levlam
8991ddf263 Add supergroup.has_active_stories/has_unread_active_stories. 2023-09-05 16:50:41 +03:00
levlam
153ff5503b Update layer to 164. 2023-08-15 22:45:37 +03:00
levlam
daf480138d Ignore the unsupported chat among returned chats. 2023-09-17 01:34:13 +03:00
levlam
be442ba977 Move get_user_link to AccountManager. 2023-09-11 18:59:19 +03:00
levlam
5f1b1f41fc Add class InviteLinkChatType. 2023-09-11 18:33:44 +03:00
levlam
793e2ed0be Move account-related methods to AccountManager. 2023-09-08 16:34:11 +03:00
levlam
edb3d08757 Improve chatInviteLinkInfo.type documentation. 2023-09-11 00:29:09 +03:00
levlam
f4a8338232 Add more information in td_api::chatInviteLinkInfo. 2023-09-01 18:04:06 +03:00
levlam
515c585a13 Make ContactsManager::get_user_has_unread_stories static. 2023-09-05 16:38:06 +03:00
levlam
3a75502e77 Add StoryManager::on_update_dialog_max_read_story_id. 2023-09-02 23:13:52 +03:00
levlam
1dcd78f1ed Add source to have_dialog_info_force. 2023-08-26 05:00:15 +03:00
levlam
a0990ef2fd Various fixes. 2023-08-15 17:45:16 +03:00
levlam
73bd67d88d Don't reload chat active stories if have no read access to the chat. 2023-08-14 22:31:21 +03:00
levlam
b12ade01f6 Add more checks for server StoryId. 2023-08-10 20:22:12 +03:00
levlam
7d06883668 Independently change is_is_mutual_contact_changed from is_is_contact_changed. 2023-08-10 15:49:16 +03:00
levlam
2fdaf5fdbc Detect recursive updates of chat info. 2023-08-07 23:19:28 +03:00
levlam
ad8d977a03 Reload chat active stories when is_mutual_contact changes. 2023-08-07 23:09:35 +03:00
levlam
32f6026278 Use send_closure_later to avoid cycles between ContactsManager and StoryManager. 2023-08-07 23:04:23 +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
99279ef13a Simplify story identifiers updating for users. 2023-08-11 13:12:46 +03:00
levlam
9dcfd9d66d Add ReactionManager and move there all reaction-related methods from StickersManager. 2023-08-09 12:59:48 +03:00
levlam
eaa77f76e5 Fix misprint. 2023-08-08 02:34:33 +03:00
levlam
1fbbecca9b Don't register message users/channels for bots. 2023-07-27 13:16:48 +03:00
levlam
f33dbfb97f Optimize on_get_user. 2023-07-26 15:32:35 +03:00
levlam
8c6f5ece88 Ignore updates of unneeded User fields by bots. 2023-07-25 13:45:55 +03:00
levlam
53c7cfbf02 Reload chat/channel with delay after status has changed. 2023-07-24 13:43:21 +03:00
levlam
451c559539 Add various checks. 2023-07-23 01:41:59 +03:00
levlam
102222e64f Add source to on_update_channel_max_unavailable_message_id. 2023-07-22 22:40:26 +03:00
levlam
5ee046b259 Don't update max_active_story_id_next_reload_time if user stories aren't polled. 2023-07-21 15:23:28 +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
a023e80fb5 Add User.max_active_story_id_next_reload_time. 2023-07-17 20:05:35 +03:00
levlam
1b3d14a3f9 Add source to reload_user_full and reload_chat_full. 2023-07-17 18:22:41 +03:00
levlam
956e31810a Add promise to StoryManager::on_get_user_stories. 2023-07-16 15:39:55 +03:00
levlam
7fb0bd5382 Fix resaving of users to database. 2023-07-16 13:56:28 +03:00
levlam
8f158004c4 Add more logging for updates of data about user stories. 2023-07-16 13:45:17 +03:00
levlam
b5d513dba0 Fix has_unread_active_stories for self. 2023-07-07 19:46:38 +03:00
levlam
fdcec41c93 Add and use ContactsManager::on_update_user_max_read_story_id. 2023-07-07 18:35:47 +03:00
levlam
f589137af4 Add user.has_unread_active_stories. 2023-07-07 18:25:24 +03:00
levlam
d40ea33796 Store max_active_story_id in User object. 2023-07-07 18:06:14 +03:00
levlam
7a3604d5b6 Add source to StoryManager::on_dialog_active_stories_order_updated. 2023-07-07 15:52:55 +03:00
levlam
5130ec7760 Add emojiStatus.expiration_date. 2023-07-06 20:14:42 +03:00
levlam
bcf9ff7d43 Explicitly include telegram_api.h in cpp files. 2023-07-01 14:53:04 +03:00
levlam
d67d93e5af Don't use downcast_call in simple cases. 2023-07-01 13:11:27 +03:00
levlam
7981c4086d Improve documentation. 2023-06-30 18:57:16 +03:00
levlam
6bd9aea325 Update story order when user.is_premium changes. 2023-06-30 14:41:39 +03:00
levlam
6f8fbaebf8 Always show self stories in the main story list. 2023-06-29 16:49:48 +03:00
levlam
3a3ae9eabf Explicitly pass Td to Location constructor and don't register locations for bots. 2023-06-28 19:01:00 +03:00
levlam
ffdebbea1f Hide story list for stories of non-contacts. 2023-06-28 16:56:17 +03:00
levlam
f023646c6d Add class StoryList and activeStories.list. 2023-06-28 16:09:44 +03:00
levlam
5e9d98abce Improve td_api::toggleChatStoriesAreHidden and remove User.stories_are_hidden. 2023-06-27 22:40:34 +03:00
levlam
2702d19dc4 Remove is_me from on_get_user. 2023-06-23 18:22:58 +03:00
levlam
a87a41f22d Init True fields for some manually created telegram_api objects. 2023-06-23 17:53:38 +03:00
levlam
7935fb183c Add userFullInfo.has_pinned_stories. 2023-06-15 20:53:58 +03:00
levlam
966eee8a07 Update active stories from UserFull. 2023-06-15 13:22:36 +03:00