Commit Graph

878 Commits

Author SHA1 Message Date
levlam
eb134b02f2 Improve error messages. 2021-06-25 21:21:17 +03:00
levlam
f8f03db0ce Improve error message. 2021-06-24 23:11:23 +03:00
levlam
7bf14a2405 Ban only for 60 seconds if unbanning is planned. 2021-06-23 15:40:24 +03:00
levlam
9628668def Minor improvements. 2021-06-23 03:22:23 +03:00
levlam
9b85516cfd Move bot command handling functions to BotCommand.cpp. 2021-06-22 04:25:15 +03:00
levlam
e8b32d9b05 Add td_api::deleteCommands. 2021-06-22 04:17:44 +03:00
levlam
337dbc86d9 Remove class BotInfo. 2021-06-21 04:30:02 +03:00
levlam
9940dd74db Remove botInfo class from API. 2021-06-21 04:14:29 +03:00
levlam
1904aa77b1 Add bot_commands to *Full. 2021-06-21 04:01:13 +03:00
levlam
5f9fd502b7 Replace botInfo with commands in userFullInfo. 2021-06-21 02:36:04 +03:00
levlam
f165429143 Add classes BotCommand and BotCommands. 2021-06-21 02:08:11 +03:00
levlam
37d10c0be4 Add bot_user_id to botCommands. 2021-06-21 01:32:29 +03:00
levlam
d9dc6f875d Move bot description from BotInfo to UserFull. 2021-06-21 01:12:34 +03:00
levlam
1202d55e27 Add getCommands method. 2021-06-19 04:18:02 +03:00
levlam
62a543cb35 Add BotCommandScope to setCommands. 2021-06-19 04:00:23 +03:00
levlam
cec785022a Update layer 129. 2021-06-18 18:26:11 +03:00
levlam
9440925711 Move some classes inside corresponding managers. 2021-06-18 03:06:20 +03:00
levlam
ed7a7e5eaf Check UTF-8 correctness of strings before adding them to Hints. 2021-06-17 23:29:13 +03:00
levlam
d069de6a8b Drop channel pts in inaccessible channels. 2021-06-16 02:54:17 +03:00
levlam
1e8724127a Add cache of channel participants for bots-administrators. 2021-06-12 23:53:14 +03:00
levlam
6f51690275 Add ContactsManager::on_get_channel_participant. 2021-06-11 20:02:49 +03:00
levlam
411d30e1c7 Remove Td::on_channel_unban_timeout proxy. 2021-06-10 21:56:05 +03:00
levlam
7e61f9c95c Improve error message. 2021-05-31 20:06:08 +03:00
levlam
f156da28a0 Don't update ChannelFull.participant_count by unknown Channel.participant_count. 2021-05-29 23:35:26 +03:00
levlam
98982374ee Don't store userProfilePhoto.stripped_thumb_. 2021-05-27 21:26:24 +03:00
levlam
d7c739dc70 Ignore document and chat photo minithumbnails by bots. 2021-05-27 21:15:30 +03:00
levlam
2d534e48d6 Move get_dialog_invite_link_hash to LinkManager. 2021-05-27 20:31:06 +03:00
levlam
4bb76a7b6f Update layer to 128. Remove photo volume_id/local_id. 2021-04-16 17:43:51 +03:00
levlam
a6a4eb6616 Don't include SliceBuilder.h in logging.h. 2021-05-17 15:21:11 +03:00
levlam
0d41ba340f Ensure that ChannelFull isn't loaded in on_channel_status_changed and on_channel_username_changed. 2021-05-09 18:14:43 +03:00
levlam
c0c5e24b9b Drop slow_mode_delay in saved to database ChannelFull if slow mode is disabled in the channel. 2021-05-09 03:23:45 +03:00
levlam
4a13e791bb Don't load ChannelFull from database in invalidate_channel_full. 2021-05-09 03:21:18 +03:00
levlam
25a6cb07bc Add more checks. 2021-05-09 02:53:15 +03:00
levlam
26dc0ad930 Update layer to 127. 2021-03-26 18:15:21 +03:00
levlam
f6b1ea8bdb Forcely create Dialog in get_chat_member_object. 2021-03-26 04:20:11 +03:00
levlam
7a65988f29 Check that other chats are only banned or unbanned. 2021-03-26 04:15:13 +03:00
levlam
14fc0898ad Support banning and unbanning channels and supergroups. 2021-03-26 04:11:30 +03:00
levlam
f28af4ab20 Add ContactsManager::get_participant_dialog_id. 2021-03-26 03:17:30 +03:00
levlam
ffc847dbf5 Replace search_among_users with search_among_dialogs. 2021-03-26 02:39:24 +03:00
levlam
b349696e7f Force inputPeerChannel creation for bots. 2021-03-25 01:10:34 +03:00
levlam
206cd55479 Support chat-members in getChatMember. 2021-03-24 23:40:13 +03:00
levlam
adedc7ad4f Support chats as members of other chats. 2021-03-22 04:03:24 +03:00
levlam
06791bbbf3 Update layer to 126. 2021-03-21 21:55:21 +03:00
levlam
21607d9a48 Don't allow to send messages to @replies chat. 2021-04-13 00:23:13 +03:00
levlam
1979b2b142 Ensure that participant_count is the same in Channel and ChannelFull. 2021-04-12 18:32:47 +03:00
levlam
a83362c4d1 Add source to on_load_channel_full_from_database. 2021-04-12 04:51:01 +03:00
levlam
e72863ff84 Drop repair_request_version after failed GetChannelFullQuery. 2021-04-12 04:20:43 +03:00
levlam
105542fc9a Speculatively update participant count when joining/leaving channels. 2021-04-12 03:54:07 +03:00
levlam
d6015184ee Improve log message. 2021-04-08 02:55:17 +03:00
levlam
a0dcd2d9c2 Add optional source to have_dialog_force. 2021-04-08 00:51:32 +03:00
levlam
8039660cfe Reload objects from server if failed to resolve their dependencies. 2021-04-04 03:23:22 +03:00
levlam
13a80bc4e8 Use send_closure_later to avoid cycles in add_message_to_dialog. 2021-03-29 22:36:29 +03:00
levlam
ad495c0d0c Skip error logging for deleted bots. 2021-03-29 18:10:37 +03:00
levlam
b5655ddab6 Pass UserId to Contact::Contact. 2021-03-29 08:20:54 +03:00
levlam
7aa71edad2 Drop outdated *Full.invite_link stored in the database. 2021-03-28 03:36:14 +03:00
levlam
d74749c813 Drop basic group invite link if removed from administrators. 2021-03-28 03:25:08 +03:00
levlam
984e79b7f7 Drop channel invite link, only when corresponding administrator right is removed. 2021-03-28 02:35:11 +03:00
levlam
024601eb86 Don't call remove_dialog_access_by_invite_link on username change. 2021-03-28 02:07:38 +03:00
levlam
0339921102 Improve some spelling. 2021-03-15 03:32:14 +03:00
levlam
159c4f3f00 Remove race in default_join_as updating. 2021-03-08 15:27:47 +03:00
levlam
4eab57cd7b Add chat.default_join_voice_chat_as_chat_id. 2021-03-08 15:13:36 +03:00
levlam
f4ce6c9de9 Update bio of group call participants when it is changed. 2021-03-07 13:06:34 +03:00
levlam
dd4aac2f57 Init bio in fake updateGroupCallParticipant when joining call. 2021-03-07 01:54:45 +03:00
levlam
7a19e5dbe5 Support voice chat creation in channels. 2021-03-06 02:26:13 +03:00
levlam
92d8d1b9fd Improve log messages. 2021-03-09 01:06:38 +03:00
levlam
1c3290bada Fix warning. 2021-03-04 15:10:58 +03:00
levlam
de0a2a03e5 Return better error for empty invite links. 2021-03-01 02:57:14 +03:00
levlam
813b141148 Fix channelParticipantSelf handling. 2021-03-01 02:33:38 +03:00
levlam
18fc612b3b Rename administrator_user_id to creator_user_id. 2021-02-25 16:02:07 +03:00
levlam
c733f8ed34 Minor improvements. 2021-02-25 15:56:26 +03:00
levlam
1e7795354d Add td_api::getChatInviteLink. 2021-02-24 22:25:10 +03:00
levlam
c5f84de9cd Support channel suggested actions. 2021-02-22 23:34:10 +03:00
levlam
332b7a6edb Support dismissing of chat-specific suggested actions. 2021-02-22 19:38:40 +03:00
levlam
b67bafb23c Add td_api::suggestedActionConvertToBroadcastGroup. 2021-02-22 18:06:18 +03:00
levlam
c07a1dac22 Unify UserFull/ChatFull/ChannelFull variable names. 2021-02-20 22:20:02 +03:00
levlam
3774b13ca1 Add td_api::reportChatPhoto. 2021-02-19 19:11:27 +03:00
levlam
62a4c0c58d Add updateChatMember. 2021-02-19 13:57:46 +03:00
levlam
fd190bc9bd Process updateChatParticipant and updateBotStopped. 2021-02-19 02:16:50 +03:00
levlam
ad43c83bce Add DialogParticipant constructor from telegram_api::ChatParticipant. 2021-02-19 01:38:16 +03:00
levlam
7eb751083c Add can_inite_users right check just in case. 2021-02-18 16:24:22 +03:00
levlam
9b62afbea2 Add td_api::toggleSupergroupIsBroadcastGroup. 2021-02-17 01:06:35 +03:00
levlam
5955b43d88 Add supergroup.is_broadcast_group flag. 2021-02-16 18:27:17 +03:00
levlam
12ead50446 Add number of revoked invite link to chatInviteLinkCount. 2021-02-16 15:31:58 +03:00
levlam
cc50f3b143 Support receiving message TTL setting for all chat types. 2021-02-09 17:35:48 +03:00
levlam
bf42d62f1e Unify ResultHandler subclass names and logged name. 2021-02-08 15:56:08 +03:00
levlam
f46ff6e1cd Update permanent invite link after it is revoked. 2021-02-05 19:23:29 +03:00
levlam
4cb8af0584 Support revoking permanent chat invite links. 2021-02-05 18:56:44 +03:00
levlam
342b4e45ca Support deletion of all revoked invite links created by other administrator. 2021-02-05 02:17:12 +03:00
levlam
f2f68aa3b3 Add td_api::getChatInviteLinkCounts. 2021-02-02 19:23:45 +03:00
levlam
642a9a9efb Update layer to 124. 2021-02-02 02:00:28 +03:00
levlam
22289fe68b Move struct definition back to header to fix SplitSource-build. 2021-02-12 16:53:40 +03:00
levlam
a3cdc8ffef Fix CE. 2021-02-04 16:49:41 +03:00
levlam
65a7715248 Pass promise to MessagesManager::on_dialog_deleted. 2021-02-04 16:01:04 +03:00
levlam
ad0c5e6783 Minor improvements. 2021-02-01 13:41:20 +03:00
levlam
cd3abdbeb2 Move dialog participant methods from MessagesManager to ContactsManager. 2021-01-27 02:16:17 +03:00
levlam
d246318a5c Update permanent invite link after replacing. 2021-01-26 23:59:09 +03:00
levlam
37ef232d47 Fix function name. 2021-01-26 23:15:33 +03:00
levlam
6878b41dc7 Update layer 123. 2021-01-26 13:07:03 +03:00
levlam
f77adeb28c Update layer 123. 2021-01-26 02:00:12 +03:00
levlam
01f613f7bf Add user/supergroup.is_fake. 2021-01-21 13:40:22 +03:00
levlam
da4d2b7636 Add separate banChatMember method. 2021-01-20 21:12:48 +03:00
levlam
7a45faff24 Add offset_date support in getChatInviteLinks. 2021-01-20 17:30:26 +03:00
levlam
1b7c6a9c31 Update layer 123. 2021-01-20 16:12:03 +03:00
levlam
dbf1253075 Replace deleteSupergroup with universal deleteChat method. 2021-01-20 14:49:18 +03:00
levlam
c7e4abb0a5 Add deleteChat method support. 2021-01-19 14:10:25 +03:00
levlam
936dbbb254 Add separate method for revoking chat invite links. 2021-01-18 22:35:28 +03:00
levlam
840c1ba8f9 Ignore *FullInfo without invite link. 2021-01-18 20:29:02 +03:00
levlam
3f91df5a47 Add td_api::deleteRevokedChatInviteLink. 2021-01-18 19:59:21 +03:00
levlam
93645ca29d Add td_api::deleteRevokedChatInviteLink. 2021-01-18 19:51:46 +03:00
levlam
d52c676912 Add getChatInviteLinks.is_revoked. 2021-01-18 19:32:53 +03:00
levlam
65bf9ad604 Improve field names and documentation. 2021-01-17 23:07:17 +03:00
levlam
3ae02a64c1 Make ContactsManager struct declarations private. 2021-01-16 19:23:57 +03:00
levlam
1941c0b962 Fix loading ChatFull/ChannelFull. 2021-01-14 23:40:18 +03:00
levlam
d5c0028e1e Add getChatInviteLinkUsers. 2021-01-14 23:21:23 +03:00
levlam
efc12342c2 Add getChatInviteLinks method. 2021-01-14 19:39:51 +03:00
levlam
9f37354951 Return full invite links in *FullInfo. 2021-01-13 19:14:08 +03:00
levlam
4761d7385c Move invite link methods to DialogInviteLink. 2021-01-13 18:30:58 +03:00
levlam
1816a6c7a5 Support permanent invite links. 2021-01-13 18:16:33 +03:00
levlam
5016197cf9 Load self when creating chat invite link. 2021-01-13 16:59:10 +03:00
levlam
3df10dc103 Check invite link validness. 2021-01-13 16:50:41 +03:00
levlam
b5cd03365d Add DialogInviteLink class. 2021-01-13 16:28:24 +03:00
levlam
87a2423f5a Add editChatInviteLink method. 2021-01-12 19:21:12 +03:00
levlam
0b7ce1c647 Update layer 123. Support new generateChatInviteLink. 2021-01-12 17:05:25 +03:00
levlam
3f856ccb46 Don't load dialog after ChatFull is loaded from database. 2021-01-25 17:58:19 +03:00
levlam
cec5f11d17 Don't save group administrators after basic group full is loaded from database. 2021-01-25 17:41:49 +03:00
levlam
d25edad06d Rewrite searchChatMembers and getSupergroupMembers implementation. 2021-01-25 17:34:45 +03:00
levlam
ef160aa2c0 Add struct DialogParticipants. 2021-01-25 02:00:57 +03:00
levlam
31265c93f1 Add ability to check whether a user is a mutual contact. 2021-01-21 16:49:41 +03:00
levlam
2348e175d9 Add source to get_chat_full_force. 2021-01-16 12:30:48 +03:00
levlam
db77165dad Optimize ContactsManager::search_among_users. 2021-01-16 03:14:15 +03:00
levlam
6b909386fd Simplify is_dialog_participant_suitable. 2021-01-08 02:01:49 +03:00
levlam
0ee37c5e64 Ensure that ChannelFull.member_count >= administrator_count after speculative update. 2021-01-05 15:18:15 +03:00
levlam
82f0386e73 Move some functions from misc.h to algorithm.h. 2021-01-01 16:01:03 +03:00
levlam
52c1da0a70 Update copyright year. 2021-01-01 15:57:46 +03:00
levlam
dbbfcd5d64 Update ChannelFull participant count only after channel is updated. 2021-01-01 02:46:37 +03:00
levlam
2394ccd29e Decrease max_participant_count to not update it for groups with 5000+ members. 2020-12-29 14:41:17 +03:00
levlam
c8668f224c Update ChannelFull.participant_count when channel.participant_count changes. 2020-12-25 18:06:54 +03:00
levlam
ce75097932 Increase ChannelFull.participant_count instead of decreasing administrator_count to guarantee that channel has no administrators more than participants. 2020-12-25 17:35:41 +03:00
levlam
3589676550 Minor fixes. 2020-12-22 15:51:57 +03:00
levlam
7d73126506 Add success promise to on_get_updates. 2020-12-21 22:06:52 +03:00
levlam
3413e38a61 Fix can_be_muted flag. 2020-12-18 17:08:24 +03:00
levlam
8dd4fe3166 Separately apply versioned and unversioned group call updates. 2020-12-18 16:23:49 +03:00
levlam
415a64ff24 Allow loading channel participants without bot info. 2020-12-16 17:43:34 +03:00
levlam
d165a87b73 Reload group call if rights has changed. 2020-12-16 16:38:06 +03:00
levlam
babd4dc35d Add source to on_update_dialog_group_call. 2020-12-15 19:25:07 +03:00
levlam
47a00d257b Fix basic group administrator rights. 2020-12-14 22:30:58 +03:00
levlam
98241af35a Support voice chats in basic groups. 2020-12-14 17:33:02 +03:00
levlam
6ca15f18c8 Move voice chat-related fields to Dialog. 2020-12-14 00:36:44 +03:00
levlam
00eed8928c Move voice chat creation to GroupCallManager. 2020-12-13 15:18:33 +03:00
levlam
6fdf68bad4 Store DialogId in information about group call. 2020-12-13 14:52:07 +03:00
levlam
91d4b57713 Add recent group call speakers. 2020-12-06 10:40:26 +03:00
levlam
f3c8ae83c5 Update channel when its group call is changed. 2020-12-05 21:28:57 +03:00
levlam
bc5a3d2cec Add supergroup.is_voice_chat_empty flag. 2020-12-05 19:43:57 +03:00
levlam
eb9abbb9ab Save voice chat channel_id. 2020-12-04 12:40:51 +03:00
levlam
34e05375c1 Add GroupCallId class. 2020-12-03 19:52:50 +03:00
levlam
eeee625803 Rename createVoiceChat method. 2020-12-03 01:08:20 +03:00
levlam
e1271c7fa5 Add createChatGroupCall. 2020-11-26 10:56:13 +03:00
levlam
5d6e55e939 Add group_call_id to supergroupFullInfo. 2020-11-25 23:07:10 +03:00
levlam
cc47f9b63f Support updateGroupCall. 2020-11-25 17:04:32 +03:00
levlam
09b10c0ed1 Improve names of statistical classes. 2020-11-19 17:57:15 +03:00
levlam
398c7cfd52 Don't drop administrator count in non-admined supergroups. 2020-11-06 15:16:30 +03:00
levlam
c8949e264d Allow access to channel if it has linked channel, but we can't check access to it.
GitOrigin-RevId: 897e86d18ad2b3c829c4ac544320fa4ee4ebd31b
2020-10-31 19:40:08 +03:00
levlam
98ff412f7a Use get_channel_full_const in get methods to avoid unneeded getChannelFull requests.
GitOrigin-RevId: 1959c781b6c85667065e38af125a87186746a233
2020-10-31 15:47:40 +03:00
levlam
d28a7245ea Make can_get_channel_message_statistics const to prevent unneeded getChannelFull requests.
GitOrigin-RevId: 90121f149dfa5ec6e586b8932b8507dd25614921
2020-10-31 15:28:55 +03:00
levlam
974feddb4a Reload full chat info after pinned message is dropped.
GitOrigin-RevId: 6cbf3d217b5da21f050715ed290cb122d6a4ef2c
2020-10-28 14:25:27 +03:00
levlam
bc2de6e5c0 Fix td_api::userFullInfo field order.
GitOrigin-RevId: 420adf21e8be165f4783aa1aca4130fb579fa3c2
2020-10-24 16:42:17 +03:00
levlam
5442143aba Rename pinned_message_id to last_pinned_message_id.
GitOrigin-RevId: c30148f3559f4ebecd3988c4bddc6cff82da3557
2020-10-20 20:28:37 +03:00
levlam
4b62900c0d Add chatMembersFilterMention.
GitOrigin-RevId: d84138594d1546275e5fea46d9cef42eac69449b
2020-10-19 14:06:35 +03:00
levlam
3f143b013a Use class for DialogParticipantsFilter.
GitOrigin-RevId: 56fc4ee7a35412db965c668f6a116ae29074f0a4
2020-10-19 01:48:31 +03:00
levlam
9fb26c4ea2 Return back UserFull.is_blocked.
GitOrigin-RevId: 98bc31a64c4c644fd6bb9e6e895d521b17df5afa
2020-10-17 23:38:07 +03:00
levlam
af6fe68c00 Allow to pin messages in all private chats.
GitOrigin-RevId: b5f55c22a6ec5950f5b88b66726bce918112d57f
2020-10-15 17:21:15 +03:00
levlam
d968fd0bed Implement new chat action rules.
GitOrigin-RevId: 12214755c86adfee0a7b3ec5f6e39024364cdb99
2020-10-26 15:25:34 +03:00
levlam
a6f9fde223 Update built-in bot flags.
GitOrigin-RevId: f54618d393b39e14f1269c8237d971ff47402a72
2020-10-22 13:21:51 +03:00
levlam
348fdf1a31 Add "group_anonymous_bot_user_id" option.
GitOrigin-RevId: efb6ee569861df005a53fd0255c50fdfa0460382
2020-10-13 17:02:10 +03:00
levlam
c1309d7657 Do not return deleted secret chats and replace migrated basic groups with corresponding supergroups in recently found chats.
GitOrigin-RevId: e50390583e3956a4eb8fdb92ec8a82f04cc7914f
2020-10-12 11:33:16 +03:00
levlam
30471b7099 Do not send chat actions to offline users like the main Android client.
GitOrigin-RevId: 6299f69ade490fa10bad74779b30a0d73a145ff2
2020-10-09 15:42:57 +03:00
levlam
54f32ebc80 Add source to resolve_dependencies_force.
GitOrigin-RevId: b09c73df688eea5872d65ec56f0ae1cb10717542
2020-10-08 22:54:24 +03:00
levlam
ccc9169051 Load all service accounts in getUser.
GitOrigin-RevId: 6e36be3e2e9e8decae1cc599b714ff218b892841
2020-10-05 00:19:49 +03:00
levlam
6d9953aea5 Add add_anonymous_bot_user.
GitOrigin-RevId: 9eadd5f3621f7c5a2dc065d51d105c07ffc25616
2020-10-04 23:33:21 +03:00
levlam
952cfd0cba Fix self Creator status in channels.
GitOrigin-RevId: 883cb8a08cb01e8534001e1f2936f60398ede681
2020-10-02 14:12:24 +03:00
levlam
da9141a431 Update ContactsManager::have_input_peer_channel.
GitOrigin-RevId: ae8fb4a5d3ee7f7c7740382f35ff01a287770b53
2020-09-30 22:40:34 +03:00
levlam
f83022c406 Fix warning.
GitOrigin-RevId: 0457285fd8f7313917718c01ef801037257e1053
2020-09-30 22:19:46 +03:00
levlam
3eb7714411 Fix ContactsManager::have_input_peer_channel.
GitOrigin-RevId: b1b1c702291192a56f8a1ce3675453b84e644356
2020-09-30 21:48:50 +03:00
levlam
b2c52ede12 Apply user photo for yet unreceived users.
GitOrigin-RevId: 12128a7610733fa614e6d56e3a9d116de09e3251
2020-09-29 23:33:44 +03:00
levlam
68229982da Change need_apply_min_photo only from non-min users.
GitOrigin-RevId: c2079f22f63b3717cd049eafcec524a76bbfd8c7
2020-09-25 18:09:17 +03:00
levlam
168675efd2 Embed @replies bot user.
GitOrigin-RevId: b515d197c29cf768834faed06fbca28b2fb63001
2020-09-25 18:08:09 +03:00
levlam
6cb823bbce Add telegram_service_notifications_chat_id and replise_bot_chat_id read-only options.
GitOrigin-RevId: b1fe6a5366bdb1c8c2a4ef06689f0e682fb892d4
2020-09-25 00:53:30 +03:00
levlam
b9e27e28b9 Make ContactsManager::get_service_notifications_user_id static.
GitOrigin-RevId: 28c9d570e1b9bfc7987dc299b87c0bb8ac33b38e
2020-09-24 23:04:32 +03:00
levlam
90ee4bd63c Minor fixes.
GitOrigin-RevId: ef4e2cfe4f198caec26daf04423eb26afedde5bb
2020-09-24 19:15:42 +03:00
levlam
e0adaebb91 Unify logging of request responses.
GitOrigin-RevId: ae4c0a3881a89aa235baa08c07ec97a914437d8c
2020-09-24 16:08:04 +03:00
levlam
5c0d2eb050 Add ContactsManager::get_replies_bot_user_id.
GitOrigin-RevId: 17aa32508783894088c05e411434cad96e1178bd
2020-09-24 01:28:04 +03:00
levlam
cb3f390a92 Unify "log event" spelling.
GitOrigin-RevId: a1a491981596c56dbf7541d80ead1ea9f5d5bd04
2020-09-22 02:15:09 +03:00
levlam
9a8895e043 Add get_log_event_storer convenience method.
GitOrigin-RevId: 0651bb08a5c41917b69836140e3ff512ab571571
2020-09-22 01:39:45 +03:00
levlam
e283ad8ac6 Use send_closure_later to load *Full to exclude possibility of loading them from the database synchronously and invoke some side effects such as message loading synchronously.
GitOrigin-RevId: 4c97db4ce3fd517274380eb9eea8e586c6f04399
2020-09-21 16:09:17 +03:00
levlam
ecc97d06b9 Fix chat blocking.
GitOrigin-RevId: c55076283c272019e0eb2908aab71efc09ad190a
2020-09-20 04:30:46 +03:00
levlam
446ba8d406 Replace getBlockedUsers with getBlockedChats.
GitOrigin-RevId: 431e0639095b9e01d1b897a52bca4430855560e4
2020-09-20 03:29:00 +03:00
levlam
54308a86fe Replace blockUser and unblockUser with toggleChatIsBlocked.
GitOrigin-RevId: 454542b32a7b8efc487afed54c59ae3864ea138e
2020-09-20 03:00:01 +03:00
levlam
e3f5719c5c Remove unneeded td_ usages.
GitOrigin-RevId: 4cf456413228f086d7df3d21d7024baf6db1bf15
2020-09-20 02:02:27 +03:00
levlam
9ecb61965d Move is_blcoked to Chat.
GitOrigin-RevId: 7d1fc672c9487feba0839b7af669323464243ffc
2020-09-20 01:54:40 +03:00
levlam
54ed8cfbc5 Save channelFull.is_blocked flag.
GitOrigin-RevId: 1c780c0a700070cfccc38c94b87778a7cd4415f7
2020-09-19 14:43:37 +03:00
levlam
b45ccc6d14 Update layer 119.
GitOrigin-RevId: fba8e1e0e8cf9b6fda11ab3762bd6efca5865eb8
2020-09-18 18:32:59 +03:00
levlam
fb0a43ee93 Automatically update message interaction info when linked channel is changed.
GitOrigin-RevId: 248afe64dbb6fe2e3e4fe72e474220e6c257d286
2020-09-13 17:52:39 +03:00
levlam
cd3bf3618b Show comment button only if the linked channel is still the same.
GitOrigin-RevId: cc8f31a56e0de7ace7f8b1a756dd34e14e4a5457
2020-09-11 14:51:13 +03:00
levlam
01f3eecd85 Add support for is_anonymous administrator right.
GitOrigin-RevId: d0d46d961aebcc67275bb09ec883f6feaa465c63
2020-09-11 01:49:15 +03:00
levlam
2c0a9367ac Simplify adding dialog dependencies.
GitOrigin-RevId: 27c9fcc1221e60960f0183e9d792121ca5e8fb0a
2020-09-10 23:24:33 +03:00
levlam
220ad5352b Allow write access to linked supergroups.
GitOrigin-RevId: 05008f9e07dc1d0759235431d999d59f50d7e820
2020-09-09 03:40:17 +03:00
levlam
ed782145bf Add reply_count and recent_replier_user_ids to MessageIntercationInfo.
GitOrigin-RevId: 48bae463c091d3d29e3096ebb4c2fbbbeda38dfd
2020-08-31 13:42:27 +03:00
levlam
53ca6e4f4a Add td_api::getMessageStatistics.
GitOrigin-RevId: f5d32ef829b91aa1fea59ea88b665fe39d32642c
2020-08-01 05:19:54 +03:00
levlam
8e77eacc72 Update message interaction info after receiving channel statistics.
GitOrigin-RevId: 6ec1b365c9f1299da1849fa6767f4ec79b627f90
2020-07-31 20:03:57 +03:00
levlam
12a79efbdc Improve log messages.
GitOrigin-RevId: 23d2e596dd9ce28d780fe125abd468fef132c61b
2020-08-10 08:07:01 +03:00
levlam
b340b0deaa Update layer 116. Add UserFull.supports_video_calls flag.
GitOrigin-RevId: 67aa9a84ed676e3969beb1c5a01a012167744c6d
2020-08-05 21:34:04 +03:00
levlam
4bf3b013c7 Add updateChannelParticipant processing.
GitOrigin-RevId: 5701dcbb068583266aaf00b3b4ed5c6336566e76
2020-08-03 21:54:28 +03:00
levlam
57f1ab4daf Add DialogParticipant::left.
GitOrigin-RevId: a3c111f702cf6579d22a2a17d806c772795c676d
2020-08-03 21:16:08 +03:00
levlam
2e0d642a98 Update layer 116. Support new apply_min_photo and can_view_stats flags.
GitOrigin-RevId: beb72d22576496ac082bf4a564c292f9a678b0c1
2020-07-28 02:57:23 +03:00
levlam
e34377cbcb Update photo cache after changing profile photo.
GitOrigin-RevId: cb48443fe0dd988e1d6eee40f72a8f12d6a5cefa
2020-07-20 21:10:40 +03:00
levlam
405934676e Change file_id type in as_profile_photo.
GitOrigin-RevId: fe45d895b4781c942512d5c838d99449431440d3
2020-07-20 17:46:54 +03:00
levlam
a01ad861bd Optionally send updates when deleting profile photo.
GitOrigin-RevId: bb916c244857b4f6838d7ae7108415ad4ec3a2a1
2020-07-20 17:23:32 +03:00
levlam
6b00f2fe6b Update cache after profile photo deletion instead of dropping it.
GitOrigin-RevId: 0bb120eeececb7706016aec01accd4f6194deef4
2020-07-20 17:05:49 +03:00
levlam
1984159963 Add old_photo_id to on_change_profile_photo.
GitOrigin-RevId: 28dd86b402d71af595b1ace467791c0896dbad2a
2020-07-20 01:53:40 +03:00
levlam
5b69e72b09 Update layer 116.
GitOrigin-RevId: 2daddadb7c75132729e8372a7edf40030696d038
2020-07-20 00:38:44 +03:00
levlam
09036ad929 Invalidate and reload UserFull after receiving first incoming message from the user to fix chatActionBar.
GitOrigin-RevId: 34c0492433475fc49f01159615462e7b7edf7d0b
2020-07-10 21:56:28 +03:00
levlam
8477f329f5 Add chatPhotoInfo.has_animation.
GitOrigin-RevId: d209507fdd59dd154c6acd297c6c7496b6356029
2020-07-08 22:59:31 +03:00
levlam
6476e05d1e Change input photo type to InputChatPhoto in setChatPhoto.
GitOrigin-RevId: fae612a07ffdf71f393ffea7951a76808b90f7b3
2020-07-08 19:40:23 +03:00
levlam
c1b88e2cc1 Allow to specify main_frame_timestamp when setting up animated profile photo.
GitOrigin-RevId: 8e5229642cdf5a454f932c0b201497f019344eab
2020-07-07 20:56:54 +03:00
levlam
cf93b3c69c Support initial folder for secret chats.
GitOrigin-RevId: 57894f3ff767a0b24bac08c8251f51f3e4722b6a
2020-06-30 12:11:22 +03:00
levlam
de07f2151e Add supergroup statistics.
GitOrigin-RevId: 3ef2bfa925baef0fe7cdd7a8ea8dabab21f313ef
2020-06-29 23:51:57 +03:00
levlam
0ed26e5321 Improve setProfilePhoto.
GitOrigin-RevId: 9a5ee470c0a38c7989cef642b2f69faa2228baaa
2020-06-28 17:44:56 +03:00
levlam
a297294aac Update layer to 116.
GitOrigin-RevId: 7c12605195674f0b48dbc05734e99bffb2062d0c
2020-06-24 11:45:36 +03:00
levlam
8799a30b6e Add updates about unknown users, etc. in getCurrentState.
GitOrigin-RevId: 137250f7e4e194f4048ee399e0a80bc29c6e0429
2020-07-07 18:48:17 +03:00
levlam
49d9ec8c69 Add channel_id validness checks.
GitOrigin-RevId: d2f1330b492306d982beec1429577d489986bccc
2020-07-07 17:37:19 +03:00
levlam
de242740a1 Postpone channel username change side effects before channel is loaded from database.
GitOrigin-RevId: 50e6cd47c813e346c2b0deed459bf75b65c963b0
2020-07-07 16:53:21 +03:00
levlam
abf833e4f3 Postpone channel status change side effects before channel is loaded from database.
GitOrigin-RevId: 591b017d47920027d97e0a271158e413fac9ab81
2020-07-07 16:34:47 +03:00
levlam
bf287039ce Add checks that updateUser/BasicGroup/Supergroup is sent before update*Full.
GitOrigin-RevId: 8f499cf7cc8e52c93d3abcb79d5b7f22466f0656
2020-07-07 15:36:03 +03:00
levlam
68dea56632 Use chatPhoto instead of userProfilePhoto.
GitOrigin-RevId: 4027e53be967551620c61a583bfda789a78f9581
2020-07-07 14:19:54 +03:00
levlam
193c7c6293 Rename chatPhotoFullInfo to chatPhoto.
GitOrigin-RevId: f97da057f1f74ccce283d21d1cfdd827bf51c871
2020-07-07 13:48:56 +03:00
levlam
d484baa1ee Rename chatPhoto to chatPhotoInfo.
GitOrigin-RevId: e301571c29719009148353161da483de9902eb8d
2020-07-07 13:00:56 +03:00
levlam
9a92f6d571 Simplify get_photo_object.
GitOrigin-RevId: 08c8fb7fe4eadb4bff56198d5834c708e032979b
2020-07-06 18:45:43 +03:00
levlam
82fdcd279c Drop outdated full Chat/Channel photo.
GitOrigin-RevId: 047da02c13e0de58a5fd3ca4a94e3b23485ec548
2020-07-06 18:40:58 +03:00
levlam
a7bd0c3932 Add photo to *FullInfo.
GitOrigin-RevId: 21346a0880239abe428799fa58b9132abded6f13
2020-07-06 15:26:29 +03:00
levlam
06bd4fa734 Add DialogParticipant validness checks.
GitOrigin-RevId: 74ca340bd890f0bd913a9f0d7aeb3e81f3829cf7
2020-06-30 17:46:36 +03:00
levlam
7a12f49d61 Add DialogParticipant constructor from telegram_api.
GitOrigin-RevId: 8d3080993b029028eb59c561f1fc700db87eb970
2020-06-30 16:43:44 +03:00
levlam
9a1402b13e Make full user profile photos owned by private chat.
GitOrigin-RevId: d406b1eb689db978c308dc4a08563f64cabd0d24
2020-06-27 23:48:03 +03:00
levlam
c5cba87bf6 Improve user photo registration.
GitOrigin-RevId: 323513d5a30710bb8aabde9476b09be2eb8bd059
2020-06-27 21:59:10 +03:00
levlam
2ad13e414e Remove file reference tracing for chat photos.
GitOrigin-RevId: 1cb90efec24192b5a712cabde325c8768e1af572
2020-06-27 17:05:45 +03:00
levlam
e8ac30cbbf Fix saving changed user photo in UserFull to database.
GitOrigin-RevId: 0ee766994fe59c6493f92bfe2424b3868cbbb304
2020-06-24 11:13:16 +03:00
levlam
4acf82c506 Add Photo.is_empty().
GitOrigin-RevId: 6dd6aeaaaa703f9cd865598d52b97eb64523fea0
2020-06-23 21:04:26 +03:00
levlam
ef04c17a89 Init photo ID to invalid by default.
GitOrigin-RevId: 072cd8bbd87267e086ed9a280ba5238e5e231a84
2020-06-23 20:50:16 +03:00
levlam
b02b578ab9 Add profile photo to userFullInfo.
GitOrigin-RevId: 8bf6604de32e191a0aa412cab1c00739eb774dd7
2020-06-23 19:40:37 +03:00
levlam
7f1c52bbec Update layer to 115. Support temporary read access to chat by invite link.
GitOrigin-RevId: 56bcbbde0bb6cb113db8e3c8554b7e1fd7622b23
2020-06-23 09:31:25 +03:00
levlam
6e42d79769 Replace emoji with icon_mane in chat filters.
GitOrigin-RevId: 61b30d075e330a92935ea2c8cfc0bf78fb32958b
2020-06-01 16:55:31 +03:00
levlam
c13068832b Remove excessive user photos instead of adjusting total_count.
GitOrigin-RevId: c66c645eb83e44a62172aff87a576d8b8d04368f
2020-05-18 16:23:30 +03:00
levlam
b29a945b1a Ignore SQLite key-value responses after close.
GitOrigin-RevId: a91a2dbbf8efcda91959aabfcaca964caa6fe3c3
2020-05-16 02:25:03 +03:00
levlam
e941622e32 Ignore file_reference errors for bots, because corresponding file_ids may not be duped.
GitOrigin-RevId: 3cf82083a6d3e5556f665bad9ad00e216c7901a0
2020-05-07 15:56:57 +03:00
levlam
75ba29bffe Add source to get_channel_full_force.
GitOrigin-RevId: 0a7a17f21e906322f572fac0409fd49827702884
2020-05-01 14:18:40 +03:00
levlam
3b4483677c Do not drop username, location and linked chat of channels banned in.
GitOrigin-RevId: 2186c21d024c4d099d9bd4b0d537ff374c920553
2020-05-01 02:54:40 +03:00
levlam
b23ff9697b Allow left creator to restrict/unrestrict channel members.
GitOrigin-RevId: 60c1e54b9c1b275f0038bb4ebc35c57662010711
2020-05-01 01:57:24 +03:00
levlam
8bbc32e21c Drop UserFull cache when phone number privacy is changed.
GitOrigin-RevId: 4ff14b72fa4b903c9358a1a10023e7b5f3775ff8
2020-05-01 01:21:02 +03:00
levlam
269047d133 Remove AuthManager::set_is_bot.
GitOrigin-RevId: b56180dda8aab189c0cb3a3d2f5624e4a5307366
2020-04-30 00:54:43 +03:00
levlam
a40bdeca4c Ensure that user photos offset doesn't exceed total photo count.
GitOrigin-RevId: 06bc1057cbcffe6e6a4911f236d2d7500057c1ec
2020-04-29 23:18:32 +03:00
levlam
585a8f19fa Fix total UserPhotos count if know more photos than expected.
GitOrigin-RevId: ff30c4e2d6965d02eb24a9d58b1f01ea1d3d89a7
2020-04-29 22:54:33 +03:00
levlam
23ad80e3a9 Silence warning about changed dialog order if dialog info was received from serverr.
GitOrigin-RevId: b6211153533746180307542d3e19fcd10aac63d2
2020-04-29 22:28:57 +03:00
levlam
b8c300b05b Fix updating of channel member count.
GitOrigin-RevId: f6f49994937d68bbe175a619d37d19900de756f6
2020-04-21 21:08:59 +03:00
levlam
8681b76de2 Minor fixes.
GitOrigin-RevId: b75bac1586ed36b91b7c2ab64c386f94f18d8539
2020-04-21 03:29:20 +03:00
levlam
87afb93b93 Fix some ID spelling.
GitOrigin-RevId: cdd8cdb93696c690cf7bdb9b2df175bb926a7510
2020-04-19 13:45:37 +03:00
levlam
822bc95d13 Reget users to restore their online status after removing them from privacy restrictions.
GitOrigin-RevId: e29832c5a056cdc5708c02ce31e77570ff335ced
2020-04-19 12:53:07 +03:00
levlam
3bcf9ad301 Update layer 112.
GitOrigin-RevId: 9d2b213ecf8a60ffa9af17512c026ee0c71730b6
2020-04-16 21:46:58 +03:00
levlam
d83a85038f Add tz_offset support.
GitOrigin-RevId: 4b3a1b1d214bf163ce6a72901726fde4243adb50
2020-04-09 00:09:55 +03:00
levlam
bb75ea35da Update layer to 112.
GitOrigin-RevId: 9d18b24ce8aeb86624a61c04e55ca5b4a42634ce
2020-04-03 16:50:10 +03:00
levlam
97c9cdc996 Do nothing if pending profile photo is not changed.
GitOrigin-RevId: fe980a5902fb9407437c1df56f15a76a64fba319
2020-04-11 01:44:22 +03:00
levlam
8aae040e21 Return 429 from ImportContacts if no one was imported.
GitOrigin-RevId: 9fc2b4c929fc549872585df5f007504f8956e034
2020-04-08 02:48:34 +03:00
levlam
2cd73ca028 Skip empty contacts.deleteByPhones request.
GitOrigin-RevId: e9a2f30b9d2d149bcb699604e2fdb836e17c83ce
2020-04-08 00:54:41 +03:00
levlam
ad752d27bd Do not allow to set need_phone_number_privacy_exception to true for contacts.
GitOrigin-RevId: b769afe07d879334a608e6c6bb6034b39ed37b45
2020-04-08 00:49:18 +03:00
levlam
b6ac360875 Invalidate cache of users deleted from contacts to repair their online status.
GitOrigin-RevId: b6775e9156385d7ca80fe627b395053eed24b155
2020-04-08 00:36:57 +03:00
levlam
fef67252d1 Reload ChannelFull before getting channel statistics if needed.
GitOrigin-RevId: 0730f4a8411bf2e5e2841bc95f1960b6619742c6
2020-04-07 23:11:44 +03:00
levlam
1d8004d279 Add force to get_user_full.
GitOrigin-RevId: 182ab8a99142a12c51662ee0928480f6a3e03f91
2020-04-07 03:23:53 +03:00
levlam
4334f5e63a Remove unnecessary logging.
GitOrigin-RevId: 33419021cffedb85336c51b3d1f783ceeac9f415
2020-04-07 02:41:46 +03:00
levlam
1cb2141fee Add force to get_channel_full.
GitOrigin-RevId: 76bc8e90bc5aba1443739199800074bf52e7d8d3
2020-04-02 04:33:04 +03:00
levlam
bf7f9e9bef Improve logging.
GitOrigin-RevId: 6bc8d2e6a80629535839344f0832c871a5de5721
2020-04-02 00:43:54 +03:00
levlam
3b2c06e520 Improve chat statistics.
GitOrigin-RevId: a55d3a62bbeded1000f58a348c1ab7225b85d39a
2020-04-03 03:53:33 +03:00
Fela Ameghino
81babdf915
Implemented chat statistics (#981) 2020-04-02 16:06:05 +03:00
levlam
d2b441f812 Disable profile photos debug warnings.
GitOrigin-RevId: abe2ea6b184027f6e23b1193d8d61e51ed580c65
2020-03-31 03:13:59 +03:00
levlam
aefab830b1 Use better type in static_cast.
GitOrigin-RevId: 6babad6d6340d428cf73cbbe914c3e1fd4b30040
2020-03-31 03:02:51 +03:00
levlam
2a1717cc18 Do not warn on chat version gap.
GitOrigin-RevId: 21afbfc8616ed851cf807a8210150dda6431ae95
2020-03-31 02:58:50 +03:00
levlam
f5ede0b528 Add debug warning in drop_user_photos.
GitOrigin-RevId: d886262d3d8fdff8cbb476a5e1b19e78f485b229
2020-03-31 02:50:50 +03:00
levlam
e65dddef7e Apply pending profile photo before getting full list of photos.
GitOrigin-RevId: e03d728b9ba9012662c819fce24dca591b659f41
2020-03-31 02:46:04 +03:00
levlam
bcc8dbc158 Use Global::is_expected_error whenever appropriate.
GitOrigin-RevId: aba8ee6e3dc1ab6e680a5ae10f6c3d217ab0a8dc
2020-03-31 00:35:58 +03:00
levlam
4cfb7c56d2 Add Global::is_expected_error.
GitOrigin-RevId: afa4741a772ad99844195a583ee40d3fc50fef4f
2020-03-31 00:22:52 +03:00
levlam
efd22eff7e Add temporarily debug warning.
GitOrigin-RevId: aaa63a04daac08c75a0210a7055054c9251e150f
2020-03-30 23:29:12 +03:00
levlam
e8e546a721 Fix retries in getBasicGroupFullInfo.
GitOrigin-RevId: acd566f171998c130f0e3a0544b11e6430148f07
2020-03-30 22:20:34 +03:00
levlam
ce4b2a5082 Add td_api::setCommands.
GitOrigin-RevId: 13284b798b074402096a1c6d8fd149d67ded0df1
2020-03-28 01:43:52 +03:00
levlam
2f850bc834 Fix warnings.
GitOrigin-RevId: 25c5aaaf29fd1284427f354291a6e664847413ea
2020-03-20 17:32:58 +03:00
levlam
3d07b45a21 Update layer to 111.
GitOrigin-RevId: 47862200a12f3b5b9e5058192d5e9a9cdca862aa
2020-03-14 01:56:47 +03:00
levlam
302485d673 Repair dialog action bar with delay to not receive outdated data.
GitOrigin-RevId: 74c3cb3ae95e5204153b91fd220b3e6b62bd87df
2020-03-24 03:47:33 +03:00
levlam
2d9eb0c00b Do not create *Full if there is no corresponding User/Chat/Channel.
GitOrigin-RevId: 8f046c4fb85d5d406f59569a6be2ef7988d3e452
2020-03-24 00:59:14 +03:00
levlam
b8848a2ab4 Simplify NetQuery creation.
GitOrigin-RevId: a01e72f8e196b405dd28dfd75d16cadc7127ec4a
2020-03-16 00:17:11 +03:00
levlam
7ec4c26514 Improve error messages.
GitOrigin-RevId: 336ef2751e51381c4dd7905ef5b050b691b91e08
2020-03-02 12:52:13 +03:00
levlam
92df8f9827 Remove unneeded brackets.
GitOrigin-RevId: 0b8a2ae21d28e6c276db8b45ffb4d127800f5d73
2020-02-26 18:15:19 +03:00
levlam
6a56320b06 Fix saving new channels to database.
GitOrigin-RevId: 77074cfbec8299dfc0be9ba70a79afc1e7c3256a
2020-02-22 17:04:15 +03:00
levlam
b80bb038d9 Copy channel.member_count from database.
GitOrigin-RevId: 84c8dd3fda25029d882dc84989499c0416cfc2e2
2020-02-19 20:24:37 +03:00
levlam
3aa55a2e89 Add setLocation method.
GitOrigin-RevId: 43fef89f4d2175cf9ec5a20409979c988e781a28
2020-02-14 16:17:45 +03:00