Skip to content

Commit 33288a9

Browse files
committed
Update layer to 150.
1 parent b3fe271 commit 33288a9

File tree

6 files changed

+37
-12
lines changed

6 files changed

+37
-12
lines changed

td/generate/scheme/telegram_api.tl

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ channel#83259464 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.
120120
channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
121121

122122
chatFull#c9d31138 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?ChatReactions = ChatFull;
123-
channelFull#f2355507 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions = ChatFull;
123+
channelFull#f2355507 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions = ChatFull;
124124

125125
chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
126126
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
@@ -176,17 +176,17 @@ messageActionContactSignUp#f3f25f76 = MessageAction;
176176
messageActionGeoProximityReached#98e0d697 from_id:Peer to_id:Peer distance:int = MessageAction;
177177
messageActionGroupCall#7a0d7f42 flags:# call:InputGroupCall duration:flags.0?int = MessageAction;
178178
messageActionInviteToGroupCall#502f92f7 call:InputGroupCall users:Vector<long> = MessageAction;
179-
messageActionSetMessagesTTL#aa1afbfd period:int = MessageAction;
179+
messageActionSetMessagesTTL#3c134d7b flags:# period:int auto_setting_from:flags.0?long = MessageAction;
180180
messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction;
181181
messageActionSetChatTheme#aa786345 emoticon:string = MessageAction;
182182
messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
183183
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
184184
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
185185
messageActionGiftPremium#aba0f5c6 currency:string amount:long months:int = MessageAction;
186186
messageActionTopicCreate#d999256 flags:# title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction;
187-
messageActionTopicEdit#b18a431c flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool = MessageAction;
187+
messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction;
188188

189-
dialog#a8edd0f5 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int = Dialog;
189+
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
190190
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
191191

192192
photoEmpty#2331b22d id:long = Photo;
@@ -715,6 +715,7 @@ auth.codeTypeSms#72a3158c = auth.CodeType;
715715
auth.codeTypeCall#741cd3e3 = auth.CodeType;
716716
auth.codeTypeFlashCall#226ccefb = auth.CodeType;
717717
auth.codeTypeMissedCall#d61ad6ee = auth.CodeType;
718+
auth.codeTypeFragmentSms#6ed998c = auth.CodeType;
718719

719720
auth.sentCodeTypeApp#3dbb5986 length:int = auth.SentCodeType;
720721
auth.sentCodeTypeSms#c000bba2 length:int = auth.SentCodeType;
@@ -723,6 +724,7 @@ auth.sentCodeTypeFlashCall#ab03c6d9 pattern:string = auth.SentCodeType;
723724
auth.sentCodeTypeMissedCall#82006484 prefix:string length:int = auth.SentCodeType;
724725
auth.sentCodeTypeEmailCode#5a159841 flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true email_pattern:string length:int next_phone_login_date:flags.2?int = auth.SentCodeType;
725726
auth.sentCodeTypeSetUpEmailRequired#a5491dea flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true = auth.SentCodeType;
727+
auth.sentCodeTypeFragmentSms#d9565c39 url:string length:int = auth.SentCodeType;
726728

727729
messages.botCallbackAnswer#36585ea4 flags:# alert:flags.1?true has_url:flags.3?true native_ui:flags.4?true message:flags.0?string url:flags.2?string cache_time:int = messages.BotCallbackAnswer;
728730

@@ -956,6 +958,7 @@ channelAdminLogEventActionCreateTopic#58707d28 topic:ForumTopic = ChannelAdminLo
956958
channelAdminLogEventActionEditTopic#f06fe208 prev_topic:ForumTopic new_topic:ForumTopic = ChannelAdminLogEventAction;
957959
channelAdminLogEventActionDeleteTopic#ae168909 topic:ForumTopic = ChannelAdminLogEventAction;
958960
channelAdminLogEventActionPinTopic#5d8d353b flags:# prev_topic:flags.0?ForumTopic new_topic:flags.1?ForumTopic = ChannelAdminLogEventAction;
961+
channelAdminLogEventActionToggleAntiSpam#64f36dfc new_value:Bool = ChannelAdminLogEventAction;
959962

960963
channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
961964

@@ -1462,6 +1465,10 @@ forumTopic#71701da9 flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?t
14621465

14631466
messages.forumTopics#367617d3 flags:# order_by_create_date:flags.0?true count:int topics:Vector<ForumTopic> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> pts:int = messages.ForumTopics;
14641467

1468+
defaultHistoryTTL#43b46b20 period:int = DefaultHistoryTTL;
1469+
1470+
exportedContactToken#41bf109b url:string expires:int = ExportedContactToken;
1471+
14651472
---functions---
14661473

14671474
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -1601,6 +1608,8 @@ contacts.acceptContact#f831a20f id:InputUser = Updates;
16011608
contacts.getLocated#d348bc44 flags:# background:flags.1?true geo_point:InputGeoPoint self_expires:flags.0?int = Updates;
16021609
contacts.blockFromReplies#29a8962c flags:# delete_message:flags.0?true delete_history:flags.1?true report_spam:flags.2?true msg_id:int = Updates;
16031610
contacts.resolvePhone#8af94344 phone:string = contacts.ResolvedPeer;
1611+
contacts.exportContactToken#f8654027 = ExportedContactToken;
1612+
contacts.importContactToken#13005788 token:string = User;
16041613

16051614
messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages;
16061615
messages.getDialogs#a0f4cb4f flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.Dialogs;
@@ -1623,7 +1632,7 @@ messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
16231632
messages.editChatPhoto#35ddd674 chat_id:long photo:InputChatPhoto = Updates;
16241633
messages.addChatUser#f24753e3 chat_id:long user_id:InputUser fwd_limit:int = Updates;
16251634
messages.deleteChatUser#a2185cab flags:# revoke_history:flags.0?true chat_id:long user_id:InputUser = Updates;
1626-
messages.createChat#9cb126e users:Vector<InputUser> title:string = Updates;
1635+
messages.createChat#34a818 flags:# users:Vector<InputUser> title:string ttl_period:flags.0?int = Updates;
16271636
messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;
16281637
messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat;
16291638
messages.acceptEncryption#3dbc0415 peer:InputEncryptedChat g_b:bytes key_fingerprint:long = EncryptedChat;
@@ -1779,6 +1788,8 @@ messages.getTopReactions#bb8125ba limit:int hash:long = messages.Reactions;
17791788
messages.getRecentReactions#39461db2 limit:int hash:long = messages.Reactions;
17801789
messages.clearRecentReactions#9dfeefb4 = Bool;
17811790
messages.getExtendedMedia#84f80814 peer:InputPeer id:Vector<int> = Updates;
1791+
messages.setDefaultHistoryTTL#9eb51445 period:int = Bool;
1792+
messages.getDefaultHistoryTTL#658b7188 = DefaultHistoryTTL;
17821793

17831794
updates.getState#edd4882a = updates.State;
17841795
updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
@@ -1830,7 +1841,7 @@ channels.getParticipants#77ced9d0 channel:InputChannel filter:ChannelParticipant
18301841
channels.getParticipant#a0ab6cc6 channel:InputChannel participant:InputPeer = channels.ChannelParticipant;
18311842
channels.getChannels#a7f6bbb id:Vector<InputChannel> = messages.Chats;
18321843
channels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull;
1833-
channels.createChannel#3d5fb10f flags:# broadcast:flags.0?true megagroup:flags.1?true for_import:flags.3?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string = Updates;
1844+
channels.createChannel#91006707 flags:# broadcast:flags.0?true megagroup:flags.1?true for_import:flags.3?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string ttl_period:flags.4?int = Updates;
18341845
channels.editAdmin#d33c8902 channel:InputChannel user_id:InputUser admin_rights:ChatAdminRights rank:string = Updates;
18351846
channels.editTitle#566decd0 channel:InputChannel title:string = Updates;
18361847
channels.editPhoto#f12e57c9 channel:InputChannel photo:InputChatPhoto = Updates;
@@ -1870,10 +1881,12 @@ channels.toggleForum#a4298b29 channel:InputChannel enabled:Bool = Updates;
18701881
channels.createForumTopic#f40c0224 flags:# channel:InputChannel title:string icon_color:flags.0?int icon_emoji_id:flags.3?long random_id:long send_as:flags.2?InputPeer = Updates;
18711882
channels.getForumTopics#de560d1 flags:# channel:InputChannel q:flags.0?string offset_date:int offset_id:int offset_topic:int limit:int = messages.ForumTopics;
18721883
channels.getForumTopicsByID#b0831eb9 channel:InputChannel topics:Vector<int> = messages.ForumTopics;
1873-
channels.editForumTopic#6c883e2d flags:# channel:InputChannel topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool = Updates;
1884+
channels.editForumTopic#f4dfa185 flags:# channel:InputChannel topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates;
18741885
channels.updatePinnedForumTopic#6c2d9026 channel:InputChannel topic_id:int pinned:Bool = Updates;
18751886
channels.deleteTopicHistory#34435f2d channel:InputChannel top_msg_id:int = messages.AffectedHistory;
18761887
channels.reorderPinnedForumTopics#2950a18f flags:# force:flags.0?true channel:InputChannel order:Vector<int> = Updates;
1888+
channels.toggleAntiSpam#68f3e4eb channel:InputChannel enabled:Bool = Updates;
1889+
channels.reportAntiSpamFalsePositive#a850a693 channel:InputChannel msg_id:int = Bool;
18771890

18781891
bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON;
18791892
bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;

td/telegram/DialogEventLog.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ static td_api::object_ptr<td_api::ChatEventAction> get_chat_event_action_object(
411411
return td_api::make_object<td_api::chatEventForumTopicPinned>(old_topic_info.get_forum_topic_info_object(td),
412412
new_topic_info.get_forum_topic_info_object(td));
413413
}
414+
case telegram_api::channelAdminLogEventActionToggleAntiSpam::ID: {
415+
return nullptr;
416+
}
414417
default:
415418
UNREACHABLE();
416419
return nullptr;

td/telegram/ForumTopicManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class EditForumTopicQuery final : public Td::ResultHandler {
134134
send_query(G()->net_query_creator().create(
135135
telegram_api::channels_editForumTopic(flags, std::move(input_channel),
136136
top_thread_message_id.get_server_message_id().get(), title,
137-
icon_custom_emoji_id.get(), false),
137+
icon_custom_emoji_id.get(), false, false),
138138
{{channel_id}}));
139139
}
140140

@@ -149,7 +149,7 @@ class EditForumTopicQuery final : public Td::ResultHandler {
149149
send_query(G()->net_query_creator().create(
150150
telegram_api::channels_editForumTopic(flags, std::move(input_channel),
151151
top_thread_message_id.get_server_message_id().get(), string(), 0,
152-
is_closed),
152+
is_closed, false),
153153
{{channel_id}}));
154154
}
155155

td/telegram/MessagesManager.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,9 @@ class CreateChatQuery final : public Td::ResultHandler {
10151015

10161016
void send(vector<tl_object_ptr<telegram_api::InputUser>> &&input_users, const string &title, int64 random_id) {
10171017
random_id_ = random_id;
1018-
send_query(G()->net_query_creator().create(telegram_api::messages_createChat(std::move(input_users), title)));
1018+
int32 flags = 0;
1019+
send_query(
1020+
G()->net_query_creator().create(telegram_api::messages_createChat(flags, std::move(input_users), title, 0)));
10191021
}
10201022

10211023
void on_result(BufferSlice packet) final {
@@ -1061,7 +1063,7 @@ class CreateChannelQuery final : public Td::ResultHandler {
10611063
random_id_ = random_id;
10621064
send_query(G()->net_query_creator().create(
10631065
telegram_api::channels_createChannel(flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, title,
1064-
about, location.get_input_geo_point(), location.get_address())));
1066+
about, location.get_input_geo_point(), location.get_address(), 0)));
10651067
}
10661068

10671069
void on_result(BufferSlice packet) final {

td/telegram/SendCodeHelper.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ SendCodeHelper::AuthenticationCodeInfo SendCodeHelper::get_authentication_code_i
120120
return {AuthenticationCodeInfo::Type::FlashCall, 0, string()};
121121
case telegram_api::auth_codeTypeMissedCall::ID:
122122
return {AuthenticationCodeInfo::Type::MissedCall, 0, string()};
123+
case telegram_api::auth_codeTypeFragmentSms::ID:
124+
return {AuthenticationCodeInfo::Type::MissedCall, 0, string()};
123125
default:
124126
UNREACHABLE();
125127
return AuthenticationCodeInfo();
@@ -151,6 +153,11 @@ SendCodeHelper::AuthenticationCodeInfo SendCodeHelper::get_sent_authentication_c
151153
return AuthenticationCodeInfo{AuthenticationCodeInfo::Type::MissedCall, code_type->length_,
152154
std::move(code_type->prefix_)};
153155
}
156+
case telegram_api::auth_sentCodeTypeFragmentSms::ID: {
157+
auto code_type = move_tl_object_as<telegram_api::auth_sentCodeTypeFragmentSms>(sent_code_type_ptr);
158+
return AuthenticationCodeInfo{AuthenticationCodeInfo::Type::MissedCall, code_type->length_,
159+
std::move(code_type->url_)};
160+
}
154161
case telegram_api::auth_sentCodeTypeEmailCode::ID:
155162
case telegram_api::auth_sentCodeTypeSetUpEmailRequired::ID:
156163
default:

td/telegram/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace td {
1212

13-
constexpr int32 MTPROTO_LAYER = 149;
13+
constexpr int32 MTPROTO_LAYER = 150;
1414

1515
enum class Version : int32 {
1616
Initial, // 0

0 commit comments

Comments
 (0)