Ignore saved_peer_id in quick reply messages.

This commit is contained in:
levlam 2024-03-04 22:30:24 +03:00
parent 464973839e
commit f11ad19a4f

View File

@ -461,14 +461,17 @@ unique_ptr<QuickReplyManager::QuickReplyMessage> QuickReplyManager::create_messa
auto my_dialog_id = td_->dialog_manager_->get_my_dialog_id();
if (DialogId(message->peer_id_) != my_dialog_id || message->from_id_ != nullptr ||
message->saved_peer_id_ != nullptr || message->fwd_from_ != nullptr || message->views_ != 0 ||
message->forwards_ != 0 || message->replies_ != nullptr || message->reactions_ != nullptr ||
message->ttl_period_ != 0 || !message->out_ || message->post_ || message->edit_hide_ ||
message->from_scheduled_ || message->pinned_ || message->noforwards_ || message->mentioned_ ||
message->media_unread_ || message->reply_markup_ != nullptr || !message->restriction_reason_.empty() ||
!message->post_author_.empty() || message->from_boosts_applied_ != 0) {
message->fwd_from_ != nullptr || message->views_ != 0 || message->forwards_ != 0 ||
message->replies_ != nullptr || message->reactions_ != nullptr || message->ttl_period_ != 0 ||
!message->out_ || message->post_ || message->edit_hide_ || message->from_scheduled_ || message->pinned_ ||
message->noforwards_ || message->mentioned_ || message->media_unread_ || message->reply_markup_ != nullptr ||
!message->restriction_reason_.empty() || !message->post_author_.empty() ||
message->from_boosts_applied_ != 0) {
LOG(ERROR) << "Receive an invalid quick reply from " << source << ": " << to_string(message);
}
if (message->saved_peer_id_ != nullptr) {
LOG(DEBUG) << "Receive unneeded Saved Messages topic in quick reply " << message_id << " from " << source;
}
UserId via_bot_user_id;
if (message->flags_ & telegram_api::message::VIA_BOT_ID_MASK) {