Commit Graph

614 Commits

Author SHA1 Message Date
levlam
425bd0e364 Support sticker chat photos. 2023-01-20 17:31:33 +03:00
levlam
a14d749893 Allow to upload custom emoji photos. 2023-01-19 14:06:27 +03:00
levlam
ad8ecec67c Support separate chat permissions for different media types. 2023-01-06 14:16:34 +03:00
levlam
ad8f0c4146 Improve some spelling. 2023-01-16 12:59:43 +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
eed410ce0a Merge getUser queries. 2023-01-13 14:29:47 +03:00
levlam
cf1984844b Update copyright year. 2023-01-01 00:28:08 +03:00
levlam
a19f55b116 Rename is_aggressive_anti_spam_enabled to has_aggressive_anti_spam_enabled. 2022-12-27 19:14:37 +03:00
levlam
74eb5d6ae4 Always send updates in ContactsManager::delete_my_profile_photo_from_cache. 2022-12-26 21:40:04 +03:00
levlam
3342dcef23 Improve delete_my_profile_photo_from_cache. 2022-12-23 18:05:41 +03:00
levlam
7a865961c5 Add source to drop_user_full_photos. 2022-12-23 17:16:02 +03:00
levlam
9d192f5674 Remove unused ContactsManager::on_update_user_photo. 2022-12-23 16:09:45 +03:00
levlam
63745c9ace Preload UserFull before deletion of profile photos. 2022-12-23 15:11:00 +03:00
levlam
f3d4492086 Repair personal and public photo with getUserFull. 2022-12-23 14:52:12 +03:00
levlam
3f55703211 Register suggested profile photos. 2022-12-23 13:19:56 +03:00
levlam
a80794ffeb Explicitly call drop_user_full_photos. 2022-12-22 22:38:30 +03:00
levlam
252df2ff43 Drop only needed full profile photos. 2022-12-22 22:23:52 +03:00
levlam
6cb9371061 Add toggleSupergroupHasHiddenMembers. 2022-12-20 15:51:37 +03:00
levlam
8bfc68b3f8 Improve ContactsManager::get_channel_effective_has_hidden_participants. 2022-12-20 15:12:36 +03:00
levlam
299dc26be6 Add phoneNumberInfo.is_anonymous. 2022-12-20 15:01:39 +03:00
levlam
0fe8023cdc Add new flags to basicGroupFullInfo. 2022-12-20 11:17:51 +03:00
levlam
983cb965cf Add supergroupFullInfo.can_hide_members. 2022-12-20 11:04:00 +03:00
levlam
db761e0852 Correctly process received channel participants. 2022-12-19 21:20:14 +03:00
levlam
786cbf990c Add supergroupFullInfo.has_hidden_members. 2022-12-19 20:29:33 +03:00
levlam
f2d8575828 Add supergroupFullInfo.can_toggle_aggressive_anti_spam. 2022-12-19 13:59:09 +03:00
levlam
1ee924aeb2 Add suggestUserPersonalProfilePhoto. 2022-12-15 18:12:30 +03:00
levlam
7b8ce74ec2 Allow to set fallback profile photo. 2022-12-15 17:44:26 +03:00
levlam
8de2bc531d Add userFullInfo.fallback_photo. 2022-12-15 17:17:42 +03:00
levlam
121dd73bfb Add ContactsManager::get_user_full_profile_photo_id. 2022-12-15 15:27:22 +03:00
levlam
b2c838f7bb Add td_api::setUserPersonalProfilePhoto. 2022-12-13 14:16:49 +03:00
levlam
0db6fe533b Support personal photo in UserFull. 2022-12-09 18:46:57 +03:00
levlam
4f8844d6d5 Unify parameter order. 2022-12-20 11:27:38 +03:00
levlam
5b8161c838 Simplify optional fields access in *Full. 2022-12-16 12:37:49 +03:00
levlam
6977ac94ed Add td_api::searchUserByToken. 2022-12-01 16:54:58 +03:00
levlam
b340e559bb Add td_api::getUserLink. 2022-12-01 15:08:13 +03:00
levlam
bc332ffa37 Make option "anti_spam_bot_user_id" public and allow to load the user without network request. 2022-11-30 13:36:44 +03:00
levlam
b0e22e15e2 Add user.has_anonymous_phone_number. 2022-11-30 12:43:54 +03:00
levlam
7e88119c1f Process fragment_prefixes option. 2022-11-29 23:42:29 +03:00
levlam
3d3f73df7a Add td_api::reportSupergroupAntiSpamFalsePositive. 2022-11-25 16:38:00 +03:00
levlam
6827c79570 Add toggleSupergroupIsAggressiveAntiSpamEnabled. 2022-11-25 16:06:04 +03:00
levlam
58e0e5b2ae Add supergroupFullInfo.is_aggressive_anti_spam_enabled. 2022-11-25 15:16:37 +03:00
levlam
92d44a5282 Fix checkChatUsernameResultPublicChatsTooMany spelling. 2022-11-15 14:48:50 +03:00
levlam
a20076b620 Add checkChatUsernameResultUsernamePurchasable. 2022-11-15 14:27:18 +03:00
levlam
af05db3f15 Add td::Hash and use it everywhere instead of unusable std::hash. 2022-11-23 19:37:32 +03:00
levlam
ef71f55ec1 Use WaitFreeHashMap for user photos. 2022-11-20 23:16:21 +03:00
levlam
3b46f78584 Use WaitFreeHashMap for pending_user_photos_. 2022-11-20 22:48:01 +03:00
levlam
f18d1455cf Improve parameters name. 2022-11-18 17:05:52 +03:00
levlam
830806937e Improve source type in on_get_channel_error/on_get_dialog_error. 2022-11-17 14:18:11 +03:00
levlam
9f39aeecdf Add source to invalidate_channel_full. 2022-11-17 14:01:08 +03:00
levlam
1345e8e9a4 Increase cache version for channels. 2022-10-30 12:17:47 +03:00
levlam
9b304557c2 Add toggleSupergroupIsForum. 2022-10-25 11:52:45 +03:00
levlam
e96d9f9d68 Add ContactsManager::is_forum_channel. 2022-10-24 18:22:43 +03:00
levlam
6a16492266 Support can_manage_topics administrator right and chat permission. 2022-10-23 13:20:53 +03:00
levlam
24a3b4f86a Add supergroup.is_forum flag. 2022-10-18 14:23:09 +03:00
levlam
e42e224154 Add disableAllSupergroupUsernames. 2022-10-17 14:58:47 +03:00
levlam
85b0c0060e Add toggleUsernameIsActive/toggleSupergroupUsernameIsActive. 2022-10-17 14:04:22 +03:00
levlam
e8d7f23e2c Restore support for ContactsManager::on_update_channel_editable_username. 2022-10-17 13:12:02 +03:00
levlam
b3ab397bcd Support reordering of active usernames. 2022-10-14 15:32:54 +03:00
levlam
897032e0fd Add support for multiple usernames. 2022-10-12 21:04:18 +03:00
levlam
c1a3fa633f Move is_valid_username to misc.h. 2022-10-12 16:09:42 +03:00
levlam
9b16702674 Add ContactsManager::get_dialog_search_text. 2022-10-11 20:35:35 +03:00
levlam
62403aac3c Simplify username caching. 2022-10-11 15:13:06 +03:00
levlam
8d1ee490ad Update response of getChatAvailableMessageSenders. 2022-10-04 17:53:56 +03:00
levlam
aa6ed42734 Add class CustomEmojiId. 2022-10-03 01:26:32 +03:00
levlam
6c91b9aa6b Create all dialogs before initializing inactive_channel_ids_. 2022-09-21 18:55:21 +03:00
levlam
085ac48a9f Send updateUser when premium status expires. 2022-09-01 22:26:04 +03:00
levlam
df53830161 Add parameter setPremiumStatus.duration. 2022-09-01 22:04:33 +03:00
levlam
5d7a36a262 Make updates about change of premium status more robust. 2022-09-01 20:33:41 +03:00
levlam
52b973af35 Add class EmojiStatus. 2022-08-30 16:02:25 +03:00
levlam
ce845b0753 Process updateUserEmojiStatus. 2022-08-23 18:14:46 +03:00
levlam
02b42d7ee6 Add td_api::setPremiumBadge. 2022-08-09 15:49:47 +03:00
levlam
ff039e2195 Add user.premium_badge_custom_emoji_id. 2022-08-08 23:41:06 +03:00
levlam
092499a7c6 Use WaitFreeHashSet where appropriate. 2022-08-21 00:20:57 +03:00
levlam
73f945bd8b Support setting "is_location_visible" option before authorization. 2022-08-19 14:16:53 +03:00
levlam
44e96081c6 Support file reference repair for bot description photo and animation. 2022-08-06 13:42:35 +03:00
levlam
e5b453d169 Use WaitFreeHashMap in ContactsManager. 2022-08-04 16:18:41 +03:00
levlam
45f68d9e06 Ensure that voice_messages_forbidden is false for non-premium users. 2022-07-17 17:15:15 +03:00
levlam
fcfe9c3996 Add userFullInfo.as_restricted_voice_and_video_note_messages. 2022-07-17 16:59:12 +03:00
levlam
035f24b8e9 Add userFullInfo.premium_gift_options. 2022-07-01 15:57:38 +03:00
levlam
8537b3d495 Move MultiTimeout to MultiTimeout.h. 2022-07-02 23:32:18 +03:00
levlam
32bac7bd24 Move Promise to tdutils. 2022-06-27 13:30:18 +03:00
levlam
54fea1a8c5 Reload ChatFull with outdated photo. 2022-06-20 18:40:13 +03:00
levlam
8fae960e43 Support premium stickers in secret chats. 2022-06-03 17:31:48 +03:00
levlam
42ab42c83a Add bio_length_max option. 2022-05-30 03:23:21 +03:00
levlam
e28828fb97 Add user.added_to_attachment_menu flag. 2022-05-11 19:30:35 +03:00
levlam
7cd74e2660 Add user.is_premium flag. 2022-05-02 16:23:48 +03:00
levlam
d351636c83 Store unmodified server join_to_send/join_request flags. 2022-05-02 15:45:35 +03:00
levlam
90287d65ed Add methods for toggling join_to_send_messages and join_by_request. 2022-04-29 18:25:29 +03:00
levlam
1d1a9584a1 Add supergroup.join_to_send_messages/join_by_request. 2022-04-29 17:54:28 +03:00
levlam
61409736ad Support photo and animation in botInfo. 2022-04-19 22:56:58 +03:00
levlam
cfc20397a0 Update layer to 143. 2022-04-19 17:43:24 +03:00
levlam
883f6d2286 Copy can_be_deleted flag to Channel to avoid ChannelFull loading. 2022-05-15 12:48:22 +03:00
levlam
c17520fdbc Implement getSupportUser with request promise instead of RequestActor. 2022-05-14 18:54:21 +03:00
levlam
1995cbe6bc Simplify getSupportUser implementation. 2022-05-14 18:29:34 +03:00
levlam
6790c309ac Move data reloading to UpdatesManager. 2022-05-12 16:34:13 +03:00
levlam
995b06b317 Drop ChatFull/ChannelFull photo after updating chat/channel photo. 2022-05-06 12:41:55 +03:00
levlam
68ad0b4317 Add ContactsManager::get_dialog_id. 2022-04-30 21:13:01 +03:00
levlam
834a541bc3 Add apply_pending_user_photo and use it in on_get_user_full. 2022-04-29 11:23:27 +03:00
levlam
840cedf49c Drop ChatFull/ChannelFull photos if chat/channel photo is different. 2022-04-28 21:18:57 +03:00
levlam
d106148618 Update chat/channel photo whenever receive new full chat/channel photo. 2022-04-28 20:35:44 +03:00
levlam
161d34fc15 Keep in chat list empty joined basic groups. 2022-04-08 15:35:21 +03:00
levlam
4155752cdf Add td_api::getMenuButton. 2022-04-07 17:20:26 +03:00
levlam
62612b9668 Add BotMenuButton. 2022-04-06 20:24:54 +03:00
levlam
713debab58 Update participant cache after changing their rights. 2022-04-04 17:16:31 +03:00
levlam
c3996b4726 Always adjust administrator rights for supergroups and channels. 2022-04-04 16:19:41 +03:00
levlam
1d6488ab09 Add ContactsManager::is_broadcast_channel/is_megagroup_channel helpers. 2022-04-04 15:48:33 +03:00
levlam
a8a343704a Add ChannelType.h. 2022-04-04 15:35:09 +03:00
levlam
5b81010f0b Add promise to reload_attach_menu_bots. 2022-03-29 15:42:57 +03:00
levlam
759d02770d Allow to use deleteChatHistory to revoke messages for all members in some channels. 2022-03-29 12:14:21 +03:00
levlam
0375704460 Use get_input_user instead of have_input_user. 2022-03-28 20:26:28 +03:00
levlam
ec802b1b57 Add updateAttachMenuBots. 2022-03-25 16:00:06 +03:00
levlam
234c7423bf Add userTypeBot.can_be_added_to_attach_menu flag. 2022-03-25 13:02:01 +03:00
levlam
afa00d8b00 Add default administrator rights to botInfo. 2022-03-22 14:52:27 +03:00
levlam
479667dd1a Update layer to 140. 2022-03-18 14:46:01 +03:00
levlam
4d13e1354e Move ChannelParticipantFilter to separate header. 2022-03-19 21:53:33 +03:00
levlam
26c18680f2 Move DialogParticipantFilter to separate header. 2022-03-19 21:37:46 +03:00
levlam
1f38124861 Use FlatHashSet. 2022-03-11 21:38:48 +03:00
levlam
ff9f5b88d9 Ignore invite links to deactivated basic groups. 2022-03-11 13:00:25 +03:00
levlam
11d21d7af4 Improve phone number cache. 2022-02-28 22:43:17 +03:00
levlam
a92d1b2ae4 Add td_api::searchUserByPhoneNumber. 2022-02-18 18:13:10 +03:00
levlam
254d74c4a6 Add cache for resolved phone numbers. 2022-02-18 17:22:27 +03:00
levlam
b4fda2d45a Use FlatHashMap in mtproto and td_json_client. 2022-02-09 16:05:53 +03:00
levlam
bcc2adeb47 Fix includes and formatting. 2022-02-08 00:04:34 +03:00
Arseny Smirnov
86bceb2972 td: replace most of std::unordered_map usages to td::FlatHashMap 2022-02-07 21:21:31 +01:00
levlam
91ff746180 Add HAS_AVAILABLE_REACTIONS flags. 2022-01-04 16:35:48 +03:00
levlam
8085779cdc Update copyright year. 2022-01-01 03:35:39 +03:00
levlam
160ab905f1 Fix handling of min-channels in recent repliers. 2021-12-22 20:15:18 +03:00
levlam
1fd2e3b629 Return information about min-channels. 2021-12-22 16:48:23 +03:00
levlam
758a391e55 Store title and photo of min-channels. 2021-12-22 16:09:34 +03:00
levlam
3b2e7cf5d0 Fix compilation error. 2021-12-19 18:02:46 +03:00
levlam
93464ccd27 Use request promise in getChatAdministrators. 2021-12-18 22:44:25 +03:00
levlam
b060536ae3 Return Result<...> from get_input_user. 2021-12-16 22:46:03 +03:00
levlam
2f1d78f00e Add constants for noforward flags. 2021-12-12 15:12:19 +03:00
levlam
129601b6c1 Add "channel_bot_user_id" option. 2021-12-09 16:36:27 +03:00
levlam
831ca4b975 Rename allow_saving_content to has_private_content. 2021-12-06 21:43:55 +03:00
levlam
ecc8889cac Reload created public dialogs after local list changes. 2021-12-03 20:22:49 +03:00
levlam
fb9bb3cd69 Save and load lists of created public channels. 2021-12-03 20:10:30 +03:00
levlam
03baffcd1f Combine GetCreatedPublicChannels queries. 2021-12-03 15:40:39 +03:00
levlam
93af4377b7 Store created public broadcasts in MessagesManager. 2021-12-03 12:28:33 +03:00
levlam
cffe34e5b2 Update created public channels instead of dropping them when ownership is changed. 2021-12-02 18:10:14 +03:00
levlam
b3bc208d63 Update created public channels after has_location is changed. 2021-12-02 17:12:33 +03:00
levlam
5512700b77 Immediately reload *Full after invalidation in opened chats. 2021-12-01 23:31:10 +03:00
levlam
0ce9391ff1 Increase Chat/Channel cache version to get actual value of noforwards. 2021-11-25 11:45:42 +03:00
levlam
10159fbdf1 Add toggleChatAllowSavingContent. 2021-11-25 11:44:51 +03:00
levlam
d381323f56 Add chat.allow_saving_content flag. 2021-11-24 20:03:38 +03:00
levlam
0b2207f180 Add td_api::processChatJoinRequests. 2021-11-24 12:02:23 +03:00
levlam
f644dedcfa Replace private forward name before forwarding. 2021-11-22 11:17:28 +03:00
levlam
8f2a09f2cb Add userFullInfo.has_private_forwards. 2021-11-20 22:48:44 +03:00
levlam
993a9e24c4 Remove user_id from reportSupergroupSpam. 2021-11-19 17:12:38 +03:00