Commit Graph

1276 Commits

Author SHA1 Message Date
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
levlam
ed4d6df307 Add user.has_active_stories. 2023-06-12 15:04:49 +03:00
levlam
11c353dc7f Add td_api::toggleUserStoriesAreArchived. 2023-06-05 16:07:44 +03:00
levlam
0823f5b169 Add user.stories_are_archived flag. 2023-06-05 15:20:24 +03:00
levlam
0030ae30f8 Locally update close friends after changing them. 2023-05-04 18:42:18 +03:00
levlam
161cc91acf Add td_api::setCloseFriends. 2023-05-04 18:27:03 +03:00
levlam
86946c6b1e Reload once contacts to repair close friends. 2023-05-03 20:55:28 +03:00
levlam
fb57555f3d Add td_api::getCloseFriends. 2023-05-03 20:42:47 +03:00
levlam
a65af73b90 Add User.is_close_friend. 2023-05-03 20:22:16 +03:00
levlam
030e440757 Update layer to 160. 2023-05-01 21:07:01 +03:00
levlam
96da28d4fb Remove supergroupFullInfo.can_set_username; chat username can be changed by its owner and only by the owner. 2023-05-10 17:17:26 +03:00
levlam
302a8c137b Add comment about missing is_changed update. 2023-06-06 14:36:49 +03:00
levlam
2aaf0f5290 Fix attach_menu_enabled updating. 2023-06-06 14:34:07 +03:00
levlam
1ff0e66eb0 Drop ready_size when delete partial remote location. 2023-05-30 12:29:12 +03:00
levlam
5f5f4029e0 Fix error logging. 2023-05-15 13:40:02 +03:00
levlam
c7b9d54fdb Fix inputChannelFromMessage support. 2023-05-15 11:47:05 +03:00
levlam
6c5c26db7f Immediately ignore user photo if it's identifier is still the same. 2023-05-10 01:50:06 +03:00
levlam
ce76e164a9 Update basic group position when it is joined or left. 2023-05-08 17:29:50 +03:00
levlam
e1eff4a06a Add MessagesManager::get_chat_id_object for checking chat_id before returning it. 2023-04-13 22:41:22 +03:00
levlam
9ebadf508c Fix handling of min users. 2023-04-12 01:45:29 +03:00
levlam
13d0536db1 Add chat.background. 2023-04-10 17:23:21 +03:00
levlam
90967ba8cf Improve source in get_channel_full_force. 2023-04-09 23:47:47 +03:00
levlam
bef7184566 Improve have_input_peer for bots. 2023-04-09 23:00:44 +03:00
levlam
a52b6f025f Add td_api::getChatsForChatFolderInviteLink. 2023-04-09 21:54:40 +03:00
levlam
9b089bc194 Improve on_set_profile_photo. 2023-04-07 00:53:13 +03:00
levlam
19e15f283c Improve checkChatUsernameResultUsernamePurchasable detection. 2023-04-03 21:33:04 +03:00
levlam
e4717bae0e Send updateUserFullInfo when bot edit links are changed. 2023-04-03 21:04:22 +03:00
levlam
cc0d148ce2 Add and use static is_user_* functions. 2023-04-03 20:43:25 +03:00
levlam
c44a2d07b5 Add edit links to userFull. 2023-04-03 20:26:31 +03:00
levlam
45a6d9864c Add chatInviteLinkMember.via_chat_filter_invite_link. 2023-04-03 13:36:47 +03:00
levlam
e50e3e0b3a Add updateChatMember.via_chat_filter_invite_link. 2023-04-02 23:45:27 +03:00
levlam
890084df51 Add ContactsManager::leave_dialog. 2023-04-02 11:46:38 +03:00
levlam
ea56e6865a Add td_api::reorderActiveBotUsernames. 2023-03-30 16:41:03 +03:00
levlam
93c3b5cc07 Add toggleBotUsernameIsActive. 2023-03-30 15:34:27 +03:00
levlam
9d88c64718 Add td_api::setBotProfilePhoto. 2023-03-29 21:49:54 +03:00
levlam
aec7d5a26f Add userTypeBot.can_be_edited. 2023-03-28 16:26:42 +03:00
levlam
a45d2de881 Update layer to 158. 2023-03-21 14:11:43 +03:00
levlam
bb28f308ef Always return simple InputPeer. 2023-04-05 20:59:48 +03:00
levlam
c95598e5e1 Don't register users and channels for bots. 2023-03-27 12:05:32 +03:00
levlam
007e3d8d11 Fix get_input_peer for bots. 2023-03-27 12:02:39 +03:00
levlam
2bdb2dc371 Load channels from messages. 2023-03-22 19:22:10 +03:00
levlam
66da2bc97e Add more input_channel checks. 2023-03-22 19:17:00 +03:00
levlam
7c3822d932 Add and use ContactsManager::get_input_user_force. 2023-03-22 18:18:35 +03:00
levlam
25047c28cf Use TRY_RESULT_PROMISE for get_input_user. 2023-03-22 17:39:56 +03:00
levlam
4a0f5011cb Add some secret chat checks. 2023-03-22 15:05:05 +03:00
levlam
670bff9a01 Send updateUser when user.have_access is changed. 2023-03-17 21:59:22 +03:00
levlam
5563ad4304 Add get_update_user/basic_group/supergroup/secret_chat_object 2023-03-17 21:42:34 +03:00
levlam
c44869f873 Support input*FromMessage. 2023-03-17 18:51:04 +03:00
levlam
add71b25c9 Drop requests after few retries if failed to return profile photos. 2023-03-15 14:00:34 +03:00
levlam
56a93292bb Support multiple retries for getUserProfilePhotos. 2023-03-15 13:51:35 +03:00
levlam
1153e5464d Support multiple getUserProfilePhotos requests. 2023-03-15 13:33:41 +03:00
levlam
b1f16cffb2 Improve error message. 2023-03-14 23:39:59 +03:00
levlam
d6faa001e2 Add Global::use_sqlite_pmc. 2023-03-14 01:41:04 +03:00
levlam
f1311610e5 Remove unneeded TdParameters.h includes. 2023-03-13 20:10:18 +03:00
levlam
835ee52491 Make TdParameters private in Global. 2023-03-13 19:47:38 +03:00
levlam
6c92eaf59e Fix reload_dialog_administrators. 2023-03-10 13:13:57 +03:00
levlam
6c53a61162 Don't process USER_PRIVACY_RESTRICTED errors for bots. 2023-03-09 18:11:12 +03:00
levlam
453aecd9af Ignore USER_NOT_PARTICIPANT error when leaving a channel. 2023-03-09 16:51:12 +03:00
levlam
f100399c8e Don't call getDifference explicitly after failed requests. 2023-03-09 16:41:31 +03:00
levlam
ee3df1d03c Don't try to load broadcast members without being an administrator. 2023-03-09 16:36:33 +03:00
levlam
e45eaa9939 Handle data parsing errors in ContactsManager. 2023-03-08 19:15:51 +03:00
levlam
a49e63985d Send updateAddChatMembersPrivacyForbidden after successful request response. 2023-03-06 21:42:06 +03:00
levlam
e7242b1188 Fix includes. 2023-03-06 20:36:56 +03:00
levlam
0381558d54 Send td_api::updateAddChatMembersPrivacyForbidden after failed addition of a channel member. 2023-03-03 16:09:29 +03:00
levlam
97248f1432 Send td_api::updateAddChatMembersPrivacyForbidden after failed adding of a user to a basic group. 2023-03-03 15:43:14 +03:00
levlam
b45d56d116 Add updateAddChatMembersPrivacyForbidden. 2023-03-03 14:42:30 +03:00
levlam
dff135fa6c Allow truncated links in updates and event log. 2023-03-03 04:23:46 +03:00
levlam
672ef60828 Add td_api::getInternalLink. 2023-03-02 16:21:36 +03:00
levlam
4b7a3dc649 Make StickerSetId storer/parser implementation private. 2023-02-21 12:23:39 +03:00
levlam
1543c41f34 Fix ContactsManager::reload_channel. 2023-02-23 12:52:15 +03:00
levlam
6cf6f32418 Add Global::ignore_result_if_closing. 2023-02-16 13:35:27 +03:00
levlam
5a39bb4952 Use error code returned by get_input_file_id. 2023-02-09 18:31:02 +03:00
levlam
38b2fbe176 Fix query merge while closing. 2023-02-02 03:15:10 +03:00
levlam
882de6e8e8 Replace unsafe to maintain data_ field with get_data() method. 2023-02-02 03:08:26 +03:00
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