Commit Graph

1139 Commits

Author SHA1 Message Date
levlam
9d5299820c Add updateNewChatJoinRequest.user_chat_id. 2023-01-31 13:50:40 +03:00
levlam
0469ac0147 Add inputChatPhotoSticker. 2023-01-30 00:35:14 +03:00
levlam
17f16ce839 Avoid duplicate updateUserStatus updates for self. 2023-01-25 21:00:41 +03:00
levlam
f9b81efe4b Replace result with "Request Aborted" error only if it is successful. 2023-01-25 19:58:23 +03:00
levlam
8560ddfe84 Ignore min-channel photo for unavailable channels. 2023-01-23 14:29:16 +03:00
levlam
7d2442f57f Make StickeerPhotoSize fields private. 2023-01-23 13:02:10 +03:00
levlam
d6502824b3 Improve get_sticker_photo_size. 2023-01-21 02:07:42 +03:00
levlam
425bd0e364 Support sticker chat photos. 2023-01-20 17:31:33 +03:00
levlam
8137572794 Send updateChatIsTranslatable when premium is switched on or off. 2023-01-20 12:57:06 +03:00
levlam
337aef5c02 Support chat.is_translatable, toggleChatIsTranslatable and updateChatIsTranslatable. 2023-01-20 12:38:25 +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
050a11ece7 Update layer to 152. 2023-01-06 12:42:16 +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
13e8094aaa Reload contacts if failed to load the from database. 2023-01-13 14:38:36 +03:00
levlam
eed410ce0a Merge getUser queries. 2023-01-13 14:29:47 +03:00
levlam
5711c6c8eb Add some emptiness checks. 2023-01-02 20:12:15 +03:00
levlam
cf1984844b Update copyright year. 2023-01-01 00:28:08 +03:00
levlam
691941ea10 Revert invalid 439e0863f3. 2022-12-30 22:24:31 +03:00
levlam
6a3dac6730 Split call to destroy_on_scheduler in two to avoid variable tracking size limit. 2022-12-30 11:55:01 +03:00
levlam
9ab6822e19 Fix warning. 2022-12-30 04:31:01 +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
14989932b7 Improve set_user_profile_photo. 2022-12-27 16:00:43 +03:00
levlam
6dcc260f2a Ignore photo returned by DeleteContactProfilePhotoQuery. 2022-12-26 22:24:08 +03:00
levlam
206c8275f9 Drop UserFull photos, only if they are unknown. 2022-12-26 22:11:14 +03:00
levlam
3bb9e06f62 Use cached UserFull in ContactsManager::delete_profile_photo. 2022-12-26 22:04:06 +03:00
levlam
27fcd805e1 Remove unneeded calls to update_user/update_user_full. 2022-12-26 21:54:42 +03:00
levlam
d3c070e95e Drop all UserFull photos when profile photo is changed. 2022-12-26 21:51:31 +03:00
levlam
74eb5d6ae4 Always send updates in ContactsManager::delete_my_profile_photo_from_cache. 2022-12-26 21:40:04 +03:00
levlam
604b98696c Fix call to drop_user_photos. 2022-12-26 21:19:51 +03:00
levlam
36614ae398 Apply empty personal and public photos. 2022-12-26 21:15:26 +03:00
levlam
a4fc556e5e Minor improvements. 2022-12-26 14:58:31 +03:00
levlam
439e0863f3 Update user's username from min-user. 2022-12-26 13:15:52 +03:00
levlam
e16f442f55 Fix setting of public photo. 2022-12-26 00:38:16 +03:00
levlam
bc730f7d0f Improve photo field order in userFullInfo. 2022-12-24 08:54:17 +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
38fb9a2413 Guarantee that all UserFull photos are known or none. 2022-12-23 17:07:53 +03:00
levlam
5e44b04cc2 Always reload full user after changing a photo. 2022-12-23 16:32:14 +03:00
levlam
9d192f5674 Remove unused ContactsManager::on_update_user_photo. 2022-12-23 16:09:45 +03:00
levlam
168d921533 Keep personal and public photos after setting previous profile photo. 2022-12-23 15:36:40 +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
c467910ad6 Fix photo.id usages. 2022-12-23 14:30:30 +03:00
levlam
3f55703211 Register suggested profile photos. 2022-12-23 13:19:56 +03:00
levlam
f28fe46746 Don't update cache when suggesting a profile photo. 2022-12-22 22:53:40 +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
044b1ef6af Avoid duplicate updateChatPhoto updates. 2022-12-22 21:41:43 +03:00
levlam
f6de50e19f Fix some spelling. 2022-12-22 17:04:18 +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
ab349e1562 Support photo deletion in setUserPersonalProfilePhoto. 2022-12-15 18:39:39 +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
f941df4ec7 Add profilePhoto.is_personal flag. 2022-12-09 15:52:21 +03:00
levlam
8e7d5f5594 Update layer to 151. 2022-12-08 20:58:37 +03:00
levlam
4f8844d6d5 Unify parameter order. 2022-12-20 11:27:38 +03:00
levlam
f1eedfaa47 Simplify some usages of optional TL fields. 2022-12-18 22:15:57 +03:00
levlam
5b8161c838 Simplify optional fields access in *Full. 2022-12-16 12:37:49 +03:00
levlam
d2060a2eb3 Improve log messages with time. 2022-12-11 01:32:46 +03:00
levlam
b634948c15 Move static MessageId helpers to MessageId class. 2022-12-10 22:57:41 +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
5d0a41c807 Send updateUser when Fragment prefixes are changed. 2022-11-30 12:50:16 +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
b1ddf9d3a7 Minor fixes. 2022-11-23 16:32:09 +03:00
levlam
c7f7abb6e7 Drop chat message sender when chat become private. 2022-11-21 17:19:23 +03:00
levlam
0b387a61ad Add source to dup_file_id. 2022-11-21 11:40:43 +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
fe7ea9bac9 Invalidate ChannelFull instead of running getDifference if appropriate. 2022-11-18 18:05:04 +03:00
levlam
a4a7d7264e Try to add user to channel after unrestricting. 2022-11-18 17:49:11 +03:00
levlam
f18d1455cf Improve parameters name. 2022-11-18 17:05:52 +03:00
levlam
f8e2af3f59 Rename size() to calc_size() for WaitFree hash tables. 2022-11-18 13:16:24 +03:00
levlam
63b528f213 Speculatively add channel users added through addChatMembers. 2022-11-17 18:10:26 +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
bf6a2723ef Various user photo improvements. 2022-11-05 02:07:20 +03:00
levlam
76c13a21bc Don't drop photo cache if only minithumbnail was changed. 2022-11-05 01:25:19 +03:00
levlam
ce2791fae3 Ensure that full photo and is null if unknown. 2022-11-05 01:19:56 +03:00
levlam
bbc3f5dace Immediately drop UserFull photo after changing user photo. 2022-11-05 00:00:23 +03:00
levlam
585b1f1923 Log to ERROR inconsistent chatPhoto and chatPhotoInfo. 2022-11-04 20:33:54 +03:00
levlam
32795d50a1 Delete photo from *FullInfo before sending update*. 2022-11-04 20:31:53 +03:00
levlam
201c4c3a2e Improve error logging. 2022-10-26 13:58:37 +03:00
levlam
f9acc95d3d Disallow message history hiding in forums. 2022-10-25 12:13:34 +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
1fbd94cc81 Use InvokeAfter for requests changing usernames of the current user. 2022-10-24 17:46:27 +03:00
levlam
303ba8cd23 Use InvokeAfter for requests changing channels. 2022-10-24 17:36:31 +03:00
levlam
6a16492266 Support can_manage_topics administrator right and chat permission. 2022-10-23 13:20:53 +03:00
levlam
e079b684f0 Various improvements. 2022-10-20 13:28:07 +03:00
levlam
24a3b4f86a Add supergroup.is_forum flag. 2022-10-18 14:23:09 +03:00
levlam
5420c3526c Add td_api::forumTopicInfo. 2022-10-17 20:07:06 +03:00
levlam
41262d4629 Immediately succeed reorder usernames queries if they can't change order. 2022-10-17 17:29:13 +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
9b0cea912a Support usernames without editable username. 2022-10-14 17:45:58 +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
87174e5e81 Update layer to 148. 2022-10-07 18:04:00 +03:00
levlam
85e64fc3b9 Fix cleaning of being loaded imported contacts. 2022-10-22 01:04:29 +03:00
levlam
a54ddc8830 Call MessagesManager::on_dialog_bots_updated even the list of bots wasn't changed. 2022-10-17 17:40:59 +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
94a8cd0046 Fix checks for *Full initialization to avoid file resaving. 2022-10-06 14:10:33 +03:00
levlam
7ff1ec04b1 Improve log and error messages. 2022-10-05 21:29:05 +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
faa738d6a9 Keep only Slice overload of utf8_utf16_substr. 2022-09-22 12:08:34 +03:00
levlam
2a41ab0562 Don't add self speculatively to channel members if join requests are enabled in the chat. 2022-09-21 19:04:36 +03:00
levlam
6c91b9aa6b Create all dialogs before initializing inactive_channel_ids_. 2022-09-21 18:55:21 +03:00
levlam
7b6d0ea6b4 Load top reactions from server. 2022-09-12 17:28:58 +03:00
levlam
14a9fda4ef Rename premiumStatus to emojiStatus. 2022-09-07 10:25:21 +03:00
levlam
03af40bc08 Don't add themed premium statuses to recent. 2022-09-02 15:39:07 +03:00
levlam
e212d9c62a Improve logging. 2022-09-02 13:48:06 +03:00
levlam
0974a8c17e Fix adding of a premium status to recent. 2022-09-02 13:16:55 +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
4370e88352 Add "themed_premium_statuses_sticker_set_id" option. 2022-08-31 19:03:26 +03:00
levlam
1890d45680 Locally update recent premium statuses when changing the status. 2022-08-31 17:46:03 +03:00
levlam
c73fa3ed72 Add td_api::premiumStatus. 2022-08-30 16:48:26 +03:00
levlam
52b973af35 Add class EmojiStatus. 2022-08-30 16:02:25 +03:00
levlam
9b87c2237a Add get_premium_payment_options_object fucntion. 2022-08-26 18:59:29 +03:00
levlam
472fdd248e Remove invalid premium payment options. 2022-08-26 18:03:56 +03:00
levlam
2e31ba5188 Return multiple payment options in premiumState. 2022-08-25 22:51:04 +03:00
levlam
ce845b0753 Process updateUserEmojiStatus. 2022-08-23 18:14:46 +03:00
levlam
d1cc119b9d Use invokeAfter for self-edit queries. 2022-08-22 22:12:00 +03:00