Remove chat.pinned_message_id field.

GitOrigin-RevId: 2a22d0eff8258e33aa7efd7b6f1daccdbcba95f9
This commit is contained in:
levlam 2020-10-20 20:22:34 +03:00
parent 31fbeaa2d0
commit 39fdab7b56
3 changed files with 2 additions and 15 deletions

View File

@ -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<chatPosition> 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<chatPosition> 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<int53> = 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;

Binary file not shown.

View File

@ -19103,7 +19103,7 @@ td_api::object_ptr<td_api::chat> 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<td_api::chat> 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<td_api::updateChatPinnedMessage>(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<td_api::updateChatPinnedMessage>(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) {