From 39fdab7b56f57e3778a379cbca97e13be61cc54e Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 20 Oct 2020 20:22:34 +0300 Subject: [PATCH] Remove chat.pinned_message_id field. GitOrigin-RevId: 2a22d0eff8258e33aa7efd7b6f1daccdbcba95f9 --- td/generate/scheme/td_api.tl | 6 +----- td/generate/scheme/td_api.tlo | Bin 185208 -> 185024 bytes td/telegram/MessagesManager.cpp | 11 +---------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index cab2abccf..8862b81bd 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -859,11 +859,10 @@ chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPo //@unread_mention_count Number of unread messages with a mention/reply in the chat //@notification_settings Notification settings for this chat //@action_bar Describes actions which should be possible to do through a chat action bar; may be null -//@pinned_message_id Identifier of the newest pinned message in the chat; 0 if none //@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat //@draft_message A draft of a message in the chat; may be null //@client_data Contains application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used -chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar pinned_message_id:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat; +chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat; //@description Represents a list of chats @total_count Approximate total count of chats found @chat_ids List of chat identifiers chats total_count:int32 chat_ids:vector = Chats; @@ -3232,9 +3231,6 @@ updateScopeNotificationSettings scope:NotificationSettingsScope notification_set //@description The chat action bar was changed @chat_id Chat identifier @action_bar The new value of the action bar; may be null updateChatActionBar chat_id:int53 action_bar:ChatActionBar = Update; -//@description The chat newest pinned message was changed @chat_id Chat identifier @pinned_message_id The new identifier of the newest pinned message; 0 if there is no known pinned messages in the chat -updateChatPinnedMessage chat_id:int53 pinned_message_id:int53 = Update; - //@description The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user //@chat_id Chat identifier @reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat updateChatReplyMarkup chat_id:int53 reply_markup_message_id:int53 = Update; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index b857d0fd62a3f7a5836b9df6f69b2989aa583191..7206d669a70f12679a4312261ffe33471036760f 100644 GIT binary patch delta 2256 zcmZ8iUr1YL6wmpZO4>Sb#bV0rmbDp;c(u3UKxhUX$`DLh1j|C}gJl*R2AZmac4Q@E zFfwq%^+G;jJ~-w!AAHDA$Q~R^`_QJTt%I z@JQt-gNEVjXMg_Sm`eCuCKwC`C7!x>)KN10{%7q6q`xltj0*Iv{c^~D83x*oiWJY> z13O06`(VY$aUVpCe0t;=gC@iZBOqX8kAMrK-U!$ZDSApnBmX!84P2~(gZ%gd_!LXr z55R^|Q7d!uto~RWrM|&d*2sT|5+fDOV>I#$H{mo2_#e`Is#M_^J)R$<(e}oT=$Kku z{|Ks4#rKG4d&Py1!Gc-wF_fAWzd*K9`E}G52&Rv|yQ8|+N_By8sNffF!zpAX^Kd6Z zP2;qMZ=5Vl=vd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z0In=lbEsQO)iJtLIPMJ{w{Yzzw$O>&#_x0^`JVw6u){!g<1TOIOu5ku;Ja`6F4r2GeG CakXy% diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 3b3aee27a..8e938b47f 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -19103,7 +19103,7 @@ td_api::object_ptr MessagesManager::get_chat_object(const Dialog * d->server_unread_count + d->local_unread_count, d->last_read_inbox_message_id.get(), d->last_read_outbox_message_id.get(), d->unread_mention_count, get_chat_notification_settings_object(&d->notification_settings), get_chat_action_bar_object(d), - d->pinned_message_id.get(), d->reply_markup_message_id.get(), std::move(draft_message), d->client_data); + d->reply_markup_message_id.get(), std::move(draft_message), d->client_data); } tl_object_ptr MessagesManager::get_chat_object(DialogId dialog_id) const { @@ -28465,9 +28465,6 @@ void MessagesManager::set_dialog_pinned_message_id(Dialog *d, MessageId pinned_m on_dialog_updated(d->dialog_id, "set_dialog_pinned_message_id"); LOG(INFO) << "Set " << d->dialog_id << " pinned message to " << pinned_message_id; - LOG_CHECK(d->is_update_new_chat_sent) << "Wrong " << d->dialog_id << " in set_dialog_pinned_message_id"; - send_closure(G()->td(), &Td::send_update, - make_tl_object(d->dialog_id.get(), d->pinned_message_id.get())); } void MessagesManager::drop_dialog_pinned_message_id(Dialog *d) { @@ -28476,12 +28473,6 @@ void MessagesManager::drop_dialog_pinned_message_id(Dialog *d) { on_dialog_updated(d->dialog_id, "drop_dialog_pinned_message_id"); LOG(INFO) << "Drop " << d->dialog_id << " pinned message"; - LOG_CHECK(d->is_update_new_chat_sent) << "Wrong " << d->dialog_id << " in drop_dialog_pinned_message_id"; - send_closure(G()->td(), &Td::send_update, make_tl_object(d->dialog_id.get(), 0)); - - if (!td_->auth_manager_->is_bot()) { - get_dialog_info_full(d->dialog_id, Auto()); - } } void MessagesManager::repair_dialog_scheduled_messages(Dialog *d) {