From 8dbc175c026d3883c00d466a4b5d3784d4e2afa5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 16 Jun 2025 15:02:30 +0400 Subject: [PATCH] Update API scheme on layer 206. --- Telegram/Resources/langs/lang.strings | 3 + .../SourceFiles/api/api_chat_participants.cpp | 10 +-- Telegram/SourceFiles/apiwrap.cpp | 3 +- .../boxes/peers/choose_peer_box.cpp | 29 ++---- .../boxes/peers/edit_participant_box.cpp | 3 +- .../boxes/peers/edit_participants_box.cpp | 3 +- .../boxes/peers/edit_peer_info_box.cpp | 5 +- .../boxes/peers/edit_peer_permissions_box.cpp | 6 +- .../SourceFiles/core/local_url_handlers.cpp | 2 + Telegram/SourceFiles/data/data_channel.cpp | 26 ++---- .../data/data_chat_participant_status.cpp | 88 ++++++++++++++++++- .../data/data_chat_participant_status.h | 6 ++ .../admin_log/history_admin_log_item.cpp | 1 + Telegram/SourceFiles/mtproto/scheme/api.tl | 8 +- 14 files changed, 132 insertions(+), 61 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index c1b0d964ef..d72646e86b 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -5207,6 +5207,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_rights_channel_edit_stories" = "Edit stories of others"; "lng_rights_channel_delete_stories" = "Delete stories of others"; "lng_rights_channel_manage_calls" = "Manage live streams"; +"lng_rights_channel_manage_direct" = "Manage direct messages"; "lng_rights_group_info" = "Change group info"; "lng_rights_group_ban" = "Ban users"; "lng_rights_group_invite_link" = "Invite users via link"; @@ -5530,6 +5531,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_admin_log_admin_create_topics" = "Create topics"; "lng_admin_log_admin_manage_calls" = "Manage video chats"; "lng_admin_log_admin_manage_calls_channel" = "Manage live streams"; +"lng_admin_log_admin_manage_direct" = "Manage direct messages"; "lng_admin_log_admin_add_admins" = "Add new admins"; "lng_admin_log_subscription_extend" = "{name} renewed subscription until {date}"; @@ -6197,6 +6199,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_request_channel_delete_messages" = "delete messages"; "lng_request_channel_add_subscribers" = "add subscribers"; "lng_request_channel_manage_livestreams" = "manage live streams"; +"lng_request_channel_manage_direct" = "manage direct messages"; "lng_request_channel_add_admins" = "add new admins"; "lng_request_channel_create" = "Create a New Channel for This"; diff --git a/Telegram/SourceFiles/api/api_chat_participants.cpp b/Telegram/SourceFiles/api/api_chat_participants.cpp index af60bdfe3d..8093168d3c 100644 --- a/Telegram/SourceFiles/api/api_chat_participants.cpp +++ b/Telegram/SourceFiles/api/api_chat_participants.cpp @@ -655,10 +655,7 @@ void ChatParticipants::Restrict( channel->session().api().request(MTPchannels_EditBanned( channel->inputChannel, participant->input, - MTP_chatBannedRights( - MTP_flags(MTPDchatBannedRights::Flags::from_raw( - uint32(newRights.flags))), - MTP_int(newRights.until)) + RestrictionsToMTP(newRights) )).done([=](const MTPUpdates &result) { channel->session().api().applyUpdates(result); channel->applyEditBanned(participant, oldRights, newRights); @@ -763,10 +760,7 @@ void ChatParticipants::kick( const auto requestId = _api.request(MTPchannels_EditBanned( channel->inputChannel, participant->input, - MTP_chatBannedRights( - MTP_flags( - MTPDchatBannedRights::Flags::from_raw(uint32(rights.flags))), - MTP_int(rights.until)) + RestrictionsToMTP(rights) )).done([=](const MTPUpdates &result) { channel->session().api().applyUpdates(result); diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index 0e25f99903..004ae8c3b6 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -2169,7 +2169,8 @@ void ApiWrap::saveDraftsToCloud() { Data::WebPageForMTP( cloudDraft->webpage, textWithTags.text.isEmpty()), - MTP_long(0) // effect + MTP_long(0), // effect + MTPSuggestedPost() // )).done([=](const MTPBool &result, const MTP::Response &response) { const auto requestId = response.requestId; history->finishSavingCloudDraft( diff --git a/Telegram/SourceFiles/boxes/peers/choose_peer_box.cpp b/Telegram/SourceFiles/boxes/peers/choose_peer_box.cpp index bc336675f8..7257a3c3f8 100644 --- a/Telegram/SourceFiles/boxes/peers/choose_peer_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/choose_peer_box.cpp @@ -75,16 +75,12 @@ using RightsMap = std::vector>>; using Flag = ChatAdminRight; return { { Flag::ChangeInfo, tr::lng_request_group_change_info }, - { - Flag::DeleteMessages, - tr::lng_request_group_delete_messages }, + { Flag::DeleteMessages, tr::lng_request_group_delete_messages }, { Flag::BanUsers, tr::lng_request_group_ban_users }, { Flag::InviteByLinkOrAdd, tr::lng_request_group_invite }, { Flag::PinMessages, tr::lng_request_group_pin_messages }, { Flag::ManageTopics, tr::lng_request_group_manage_topics }, - { - Flag::ManageCall, - tr::lng_request_group_manage_video_chats }, + { Flag::ManageCall, tr::lng_request_group_manage_video_chats }, { Flag::Anonymous, tr::lng_request_group_anonymous }, { Flag::AddAdmins, tr::lng_request_group_add_admins }, }; @@ -94,21 +90,12 @@ using RightsMap = std::vector>>; using Flag = ChatAdminRight; return { { Flag::ChangeInfo, tr::lng_request_channel_change_info }, - { - Flag::PostMessages, - tr::lng_request_channel_post_messages }, - { - Flag::EditMessages, - tr::lng_request_channel_edit_messages }, - { - Flag::DeleteMessages, - tr::lng_request_channel_delete_messages }, - { - Flag::InviteByLinkOrAdd, - tr::lng_request_channel_add_subscribers }, - { - Flag::ManageCall, - tr::lng_request_channel_manage_livestreams }, + { Flag::PostMessages, tr::lng_request_channel_post_messages }, + { Flag::EditMessages, tr::lng_request_channel_edit_messages }, + { Flag::DeleteMessages, tr::lng_request_channel_delete_messages }, + { Flag::InviteByLinkOrAdd, tr::lng_request_channel_add_subscribers }, + { Flag::ManageCall, tr::lng_request_channel_manage_livestreams }, + { Flag::ManageDirect, tr::lng_request_channel_manage_direct }, { Flag::AddAdmins, tr::lng_request_channel_add_admins }, }; } diff --git a/Telegram/SourceFiles/boxes/peers/edit_participant_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participant_box.cpp index e4166a82c0..50c3254a37 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participant_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participant_box.cpp @@ -245,7 +245,8 @@ ChatAdminRightsInfo EditAdminBox::defaultRights() const { | Flag::EditStories | Flag::DeleteStories | Flag::InviteByLinkOrAdd - | Flag::ManageCall) }; + | Flag::ManageCall + | Flag::ManageDirect) }; } void EditAdminBox::prepare() { diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index ea60f38333..03fbc87c68 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -152,8 +152,7 @@ void SaveChannelAdmin( channel->session().api().request(MTPchannels_EditAdmin( channel->inputChannel, user->inputUser, - MTP_chatAdminRights(MTP_flags( - MTPDchatAdminRights::Flags::from_raw(uint32(newRights.flags)))), + AdminRightsToMTP(newRights), MTP_string(rank) )).done([=](const MTPUpdates &result) { channel->session().api().applyUpdates(result); diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index 19611e16e7..2cae756a63 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -183,10 +183,7 @@ void SaveDefaultRestrictions( const auto requestId = api->request( MTPmessages_EditChatDefaultBannedRights( peer->input, - MTP_chatBannedRights( - MTP_flags( - MTPDchatBannedRights::Flags::from_raw(uint32(rights))), - MTP_int(0))) + RestrictionsToMTP({ rights, 0 })) ).done([=](const MTPUpdates &result) { api->clearModifyRequest(key); api->applyUpdates(result); diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp index d171501b95..0b762a6cf5 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp @@ -164,11 +164,15 @@ constexpr auto kDefaultChargeStars = 10; auto stories = std::vector{ { Flag::PostStories, tr::lng_rights_channel_post_stories(tr::now) }, { Flag::EditStories, tr::lng_rights_channel_edit_stories(tr::now) }, - { Flag::DeleteStories, tr::lng_rights_channel_delete_stories(tr::now) }, + { + Flag::DeleteStories, + tr::lng_rights_channel_delete_stories(tr::now), + }, }; auto second = std::vector{ { Flag::InviteByLinkOrAdd, tr::lng_rights_group_invite(tr::now) }, { Flag::ManageCall, tr::lng_rights_channel_manage_calls(tr::now) }, + { Flag::ManageDirect, tr::lng_rights_channel_manage_direct(tr::now) }, { Flag::AddAdmins, tr::lng_rights_add_admins(tr::now) }, }; return { diff --git a/Telegram/SourceFiles/core/local_url_handlers.cpp b/Telegram/SourceFiles/core/local_url_handlers.cpp index 64e33b14ca..90ee230586 100644 --- a/Telegram/SourceFiles/core/local_url_handlers.cpp +++ b/Telegram/SourceFiles/core/local_url_handlers.cpp @@ -520,6 +520,8 @@ bool ShowWallPaper( result |= ChatAdminRight::AddAdmins; } else if (element == u"manage_video_chats"_q) { result |= ChatAdminRight::ManageCall; + } else if (element == u"manage_direct_messages"_q) { + result |= ChatAdminRight::ManageDirect; } else if (element == u"anonymous"_q) { result |= ChatAdminRight::Anonymous; } else if (element == u"manage_chat"_q) { diff --git a/Telegram/SourceFiles/data/data_channel.cpp b/Telegram/SourceFiles/data/data_channel.cpp index 02a94552ec..2195f75654 100644 --- a/Telegram/SourceFiles/data/data_channel.cpp +++ b/Telegram/SourceFiles/data/data_channel.cpp @@ -642,45 +642,38 @@ void ChannelData::setAvailableMinId(MsgId availableMinId) { } bool ChannelData::canBanMembers() const { - return amCreator() - || (adminRights() & AdminRight::BanUsers); + return amCreator() || (adminRights() & AdminRight::BanUsers); } bool ChannelData::canPostMessages() const { - return amCreator() - || (adminRights() & AdminRight::PostMessages); + return amCreator() || (adminRights() & AdminRight::PostMessages); } bool ChannelData::canEditMessages() const { - return amCreator() - || (adminRights() & AdminRight::EditMessages); + return amCreator() || (adminRights() & AdminRight::EditMessages); } bool ChannelData::canDeleteMessages() const { - return amCreator() - || (adminRights() & AdminRight::DeleteMessages); + return amCreator() || (adminRights() & AdminRight::DeleteMessages); } bool ChannelData::canPostStories() const { - return amCreator() - || (adminRights() & AdminRight::PostStories); + return amCreator() || (adminRights() & AdminRight::PostStories); } bool ChannelData::canEditStories() const { if (isMonoforum()) { return false; } - return amCreator() - || (adminRights() & AdminRight::EditStories); + return amCreator() || (adminRights() & AdminRight::EditStories); } bool ChannelData::canDeleteStories() const { - return amCreator() - || (adminRights() & AdminRight::DeleteStories); + return amCreator() || (adminRights() & AdminRight::DeleteStories); } bool ChannelData::canAccessMonoforum() const { - return canPostMessages(); + return amCreator() || (adminRights() & AdminRight::ManageDirect); } bool ChannelData::canPostPaidMedia() const { @@ -704,8 +697,7 @@ bool ChannelData::canAddMembers() const { } bool ChannelData::canAddAdmins() const { - return amCreator() - || (adminRights() & AdminRight::AddAdmins); + return amCreator() || (adminRights() & AdminRight::AddAdmins); } bool ChannelData::allowsForwarding() const { diff --git a/Telegram/SourceFiles/data/data_chat_participant_status.cpp b/Telegram/SourceFiles/data/data_chat_participant_status.cpp index de38444757..f2ec641e04 100644 --- a/Telegram/SourceFiles/data/data_chat_participant_status.cpp +++ b/Telegram/SourceFiles/data/data_chat_participant_status.cpp @@ -30,14 +30,48 @@ namespace { [[nodiscard]] ChatAdminRights ChatAdminRightsFlags( const MTPChatAdminRights &rights) { return rights.match([](const MTPDchatAdminRights &data) { - return ChatAdminRights::from_raw(int32(data.vflags().v)); + using Flag = ChatAdminRight; + return (data.is_change_info() ? Flag::ChangeInfo : Flag()) + | (data.is_post_messages() ? Flag::PostMessages : Flag()) + | (data.is_edit_messages() ? Flag::EditMessages : Flag()) + | (data.is_delete_messages() ? Flag::DeleteMessages : Flag()) + | (data.is_ban_users() ? Flag::BanUsers : Flag()) + | (data.is_invite_users() ? Flag::InviteByLinkOrAdd : Flag()) + | (data.is_pin_messages() ? Flag::PinMessages : Flag()) + | (data.is_add_admins() ? Flag::AddAdmins : Flag()) + | (data.is_anonymous() ? Flag::Anonymous : Flag()) + | (data.is_manage_call() ? Flag::ManageCall : Flag()) + | (data.is_other() ? Flag::Other : Flag()) + | (data.is_manage_topics() ? Flag::ManageTopics : Flag()) + | (data.is_post_stories() ? Flag::PostStories : Flag()) + | (data.is_edit_stories() ? Flag::EditStories : Flag()) + | (data.is_delete_stories() ? Flag::DeleteStories : Flag()) + | (data.is_manage_direct() ? Flag::ManageDirect : Flag()); }); } [[nodiscard]] ChatRestrictions ChatBannedRightsFlags( const MTPChatBannedRights &rights) { return rights.match([](const MTPDchatBannedRights &data) { - return ChatRestrictions::from_raw(int32(data.vflags().v)); + using Flag = ChatRestriction; + return (data.is_view_messages() ? Flag::ViewMessages : Flag()) + | (data.is_send_stickers() ? Flag::SendStickers : Flag()) + | (data.is_send_gifs() ? Flag::SendGifs : Flag()) + | (data.is_send_games() ? Flag::SendGames : Flag()) + | (data.is_send_inline() ? Flag::SendInline : Flag()) + | (data.is_send_polls() ? Flag::SendPolls : Flag()) + | (data.is_send_photos() ? Flag::SendPhotos : Flag()) + | (data.is_send_videos() ? Flag::SendVideos : Flag()) + | (data.is_send_roundvideos() ? Flag::SendVideoMessages : Flag()) + | (data.is_send_audios() ? Flag::SendMusic : Flag()) + | (data.is_send_voices() ? Flag::SendVoiceMessages : Flag()) + | (data.is_send_docs() ? Flag::SendFiles : Flag()) + | (data.is_send_messages() ? Flag::SendOther : Flag()) + | (data.is_embed_links() ? Flag::EmbedLinks : Flag()) + | (data.is_change_info() ? Flag::ChangeInfo : Flag()) + | (data.is_invite_users() ? Flag::AddParticipants : Flag()) + | (data.is_pin_messages() ? Flag::PinMessages : Flag()) + | (data.is_manage_topics() ? Flag::CreateTopics : Flag()); }); } @@ -54,11 +88,61 @@ ChatAdminRightsInfo::ChatAdminRightsInfo(const MTPChatAdminRights &rights) : flags(ChatAdminRightsFlags(rights)) { } +MTPChatAdminRights AdminRightsToMTP(ChatAdminRightsInfo info) { + using Flag = MTPDchatAdminRights::Flag; + using R = ChatAdminRight; + const auto flags = info.flags; + return MTP_chatAdminRights(MTP_flags(Flag() + | ((flags & R::ChangeInfo) ? Flag::f_change_info : Flag()) + | ((flags & R::PostMessages) ? Flag::f_post_messages : Flag()) + | ((flags & R::EditMessages) ? Flag::f_edit_messages : Flag()) + | ((flags & R::DeleteMessages) ? Flag::f_delete_messages : Flag()) + | ((flags & R::BanUsers) ? Flag::f_ban_users : Flag()) + | ((flags & R::InviteByLinkOrAdd) ? Flag::f_invite_users : Flag()) + | ((flags & R::PinMessages) ? Flag::f_pin_messages : Flag()) + | ((flags & R::AddAdmins) ? Flag::f_add_admins : Flag()) + | ((flags & R::Anonymous) ? Flag::f_anonymous : Flag()) + | ((flags & R::ManageCall) ? Flag::f_manage_call : Flag()) + | ((flags & R::Other) ? Flag::f_other : Flag()) + | ((flags & R::ManageTopics) ? Flag::f_manage_topics : Flag()) + | ((flags & R::PostStories) ? Flag::f_post_stories : Flag()) + | ((flags & R::EditStories) ? Flag::f_edit_stories : Flag()) + | ((flags & R::DeleteStories) ? Flag::f_delete_stories : Flag()) + | ((flags & R::ManageDirect) ? Flag::f_manage_direct : Flag()))); +} + ChatRestrictionsInfo::ChatRestrictionsInfo(const MTPChatBannedRights &rights) : flags(ChatBannedRightsFlags(rights)) , until(ChatBannedRightsUntilDate(rights)) { } +MTPChatBannedRights RestrictionsToMTP(ChatRestrictionsInfo info) { + using Flag = MTPDchatBannedRights::Flag; + using R = ChatRestriction; + const auto flags = info.flags; + return MTP_chatBannedRights( + MTP_flags(Flag() + | ((flags & R::ViewMessages) ? Flag::f_view_messages : Flag()) + | ((flags & R::SendStickers) ? Flag::f_send_stickers : Flag()) + | ((flags & R::SendGifs) ? Flag::f_send_gifs : Flag()) + | ((flags & R::SendGames) ? Flag::f_send_games : Flag()) + | ((flags & R::SendInline) ? Flag::f_send_inline : Flag()) + | ((flags & R::SendPolls) ? Flag::f_send_polls : Flag()) + | ((flags & R::SendPhotos) ? Flag::f_send_photos : Flag()) + | ((flags & R::SendVideos) ? Flag::f_send_videos : Flag()) + | ((flags & R::SendVideoMessages) ? Flag::f_send_roundvideos : Flag()) + | ((flags & R::SendMusic) ? Flag::f_send_audios : Flag()) + | ((flags & R::SendVoiceMessages) ? Flag::f_send_voices : Flag()) + | ((flags & R::SendFiles) ? Flag::f_send_docs : Flag()) + | ((flags & R::SendOther) ? Flag::f_send_messages : Flag()) + | ((flags & R::EmbedLinks) ? Flag::f_embed_links : Flag()) + | ((flags & R::ChangeInfo) ? Flag::f_change_info : Flag()) + | ((flags & R::AddParticipants) ? Flag::f_invite_users : Flag()) + | ((flags & R::PinMessages) ? Flag::f_pin_messages : Flag()) + | ((flags & R::CreateTopics) ? Flag::f_manage_topics : Flag())), + MTP_int(info.until)); +} + namespace Data { std::vector ListOfRestrictions( diff --git a/Telegram/SourceFiles/data/data_chat_participant_status.h b/Telegram/SourceFiles/data/data_chat_participant_status.h index 17a6ddfe7d..073096b09b 100644 --- a/Telegram/SourceFiles/data/data_chat_participant_status.h +++ b/Telegram/SourceFiles/data/data_chat_participant_status.h @@ -36,6 +36,7 @@ enum class ChatAdminRight { PostStories = (1 << 14), EditStories = (1 << 15), DeleteStories = (1 << 16), + ManageDirect = (1 << 17), }; inline constexpr bool is_flag_type(ChatAdminRight) { return true; } using ChatAdminRights = base::flags; @@ -75,6 +76,8 @@ struct ChatAdminRightsInfo { ChatAdminRights flags; }; +[[nodiscard]] MTPChatAdminRights AdminRightsToMTP(ChatAdminRightsInfo info); + struct ChatRestrictionsInfo { ChatRestrictionsInfo() = default; ChatRestrictionsInfo(ChatRestrictions flags, TimeId until) @@ -87,6 +90,9 @@ struct ChatRestrictionsInfo { TimeId until = 0; }; +[[nodiscard]] MTPChatBannedRights RestrictionsToMTP( + ChatRestrictionsInfo info); + namespace Data { class Thread; diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index a93d1d1925..0f656950b4 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -287,6 +287,7 @@ TextWithEntities GenerateAdminChangeText( { Flag::ManageTopics, tr::lng_admin_log_admin_manage_topics }, { Flag::PinMessages, tr::lng_admin_log_admin_pin_messages }, { Flag::ManageCall, tr::lng_admin_log_admin_manage_calls }, + { Flag::ManageDirect, tr::lng_admin_log_admin_manage_direct }, { Flag::AddAdmins, tr::lng_admin_log_admin_add_admins }, { Flag::Anonymous, tr::lng_admin_log_admin_remain_anonymous }, }; diff --git a/Telegram/SourceFiles/mtproto/scheme/api.tl b/Telegram/SourceFiles/mtproto/scheme/api.tl index 55fcec1aa4..1d89f321b4 100644 --- a/Telegram/SourceFiles/mtproto/scheme/api.tl +++ b/Telegram/SourceFiles/mtproto/scheme/api.tl @@ -117,7 +117,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto; chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto; messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message; -message#9815cec8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck report_delivery_until_date:flags2.5?int paid_message_stars:flags2.6?long suggested_post:flags2.7?SuggestedPost = Message; +message#9815cec8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true paid_suggested_post:flags2.8?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck report_delivery_until_date:flags2.5?int paid_message_stars:flags2.6?long suggested_post:flags2.7?SuggestedPost = Message; messageService#7a800e0a flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true reactions_are_possible:flags.9?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer saved_peer_id:flags.28?Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction reactions:flags.20?MessageReactions ttl_period:flags.25?int = Message; messageMediaEmpty#3ded6320 = MessageMedia; @@ -827,7 +827,7 @@ contacts.topPeers#70b772a8 categories:Vector chats:Vector< contacts.topPeersDisabled#b52c939d = contacts.TopPeers; draftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage; -draftMessage#2d65321f flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo message:string entities:flags.3?Vector media:flags.5?InputMedia date:int effect:flags.7?long = DraftMessage; +draftMessage#96eaa5eb flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo message:string entities:flags.3?Vector media:flags.5?InputMedia date:int effect:flags.7?long suggested_post:flags.8?SuggestedPost = DraftMessage; messages.featuredStickersNotModified#c6dc0c66 count:int = messages.FeaturedStickers; messages.featuredStickers#be382906 flags:# premium:flags.0?true hash:long count:int sets:Vector unread:Vector = messages.FeaturedStickers; @@ -1207,7 +1207,7 @@ chatOnlines#f041e250 onlines:int = ChatOnlines; statsURL#47a971e0 url:string = StatsURL; -chatAdminRights#5fb224d5 flags:# change_info:flags.0?true post_messages:flags.1?true edit_messages:flags.2?true delete_messages:flags.3?true ban_users:flags.4?true invite_users:flags.5?true pin_messages:flags.7?true add_admins:flags.9?true anonymous:flags.10?true manage_call:flags.11?true other:flags.12?true manage_topics:flags.13?true post_stories:flags.14?true edit_stories:flags.15?true delete_stories:flags.16?true = ChatAdminRights; +chatAdminRights#5fb224d5 flags:# change_info:flags.0?true post_messages:flags.1?true edit_messages:flags.2?true delete_messages:flags.3?true ban_users:flags.4?true invite_users:flags.5?true pin_messages:flags.7?true add_admins:flags.9?true anonymous:flags.10?true manage_call:flags.11?true other:flags.12?true manage_topics:flags.13?true post_stories:flags.14?true edit_stories:flags.15?true delete_stories:flags.16?true manage_direct:flags.17?true = ChatAdminRights; chatBannedRights#9f120418 flags:# view_messages:flags.0?true send_messages:flags.1?true send_media:flags.2?true send_stickers:flags.3?true send_gifs:flags.4?true send_games:flags.5?true send_inline:flags.6?true embed_links:flags.7?true send_polls:flags.8?true change_info:flags.10?true invite_users:flags.15?true pin_messages:flags.17?true manage_topics:flags.18?true send_photos:flags.19?true send_videos:flags.20?true send_roundvideos:flags.21?true send_audios:flags.22?true send_voices:flags.23?true send_docs:flags.24?true send_plain:flags.25?true until_date:int = ChatBannedRights; @@ -2244,7 +2244,7 @@ messages.editInlineBotMessage#83557dba flags:# no_webpage:flags.1?true invert_me messages.getBotCallbackAnswer#9342ca07 flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes password:flags.2?InputCheckPasswordSRP = messages.BotCallbackAnswer; messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long message:flags.0?string url:flags.2?string cache_time:int = Bool; messages.getPeerDialogs#e470bcfd peers:Vector = messages.PeerDialogs; -messages.saveDraft#d372c5ce flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo peer:InputPeer message:string entities:flags.3?Vector media:flags.5?InputMedia effect:flags.7?long = Bool; +messages.saveDraft#54ae308e flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo peer:InputPeer message:string entities:flags.3?Vector media:flags.5?InputMedia effect:flags.7?long suggested_post:flags.8?SuggestedPost = Bool; messages.getAllDrafts#6a3f8d65 = Updates; messages.getFeaturedStickers#64780b14 hash:long = messages.FeaturedStickers; messages.readFeaturedStickers#5b118126 id:Vector = Bool;