Disallow to reply unknown messages in another chat.
This commit is contained in:
parent
b2b665e8d6
commit
7f5b50db9b
@ -4947,7 +4947,7 @@ notificationTypeNewSecretChat = NotificationType;
|
||||
notificationTypeNewCall call_id:int32 = NotificationType;
|
||||
|
||||
//@description New message was received through a push notification
|
||||
//@message_id The message identifier. The message will not be available in the chat history, but the identifier can be used in viewMessages, or as a message to reply
|
||||
//@message_id The message identifier. The message will not be available in the chat history, but the identifier can be used in viewMessages, or as a message to reply in the same chat
|
||||
//@sender_id Identifier of the sender of the message. Corresponding user or chat may be inaccessible
|
||||
//@sender_name Name of the sender
|
||||
//@is_outgoing True, if the message is outgoing
|
||||
|
@ -24544,10 +24544,10 @@ MessageInputReplyTo MessagesManager::get_message_input_reply_to(
|
||||
if (m == nullptr || m->message_id.is_yet_unsent() ||
|
||||
(m->message_id.is_local() && reply_d->dialog_id.get_type() != DialogType::SecretChat)) {
|
||||
if (message_id.is_server() && reply_d->dialog_id.get_type() != DialogType::SecretChat &&
|
||||
message_id > reply_d->last_new_message_id &&
|
||||
reply_dialog_id == DialogId() && message_id > reply_d->last_new_message_id &&
|
||||
(reply_d->notification_info != nullptr &&
|
||||
message_id <= reply_d->notification_info->max_push_notification_message_id_)) {
|
||||
// allow to reply yet unreceived server message
|
||||
// allow to reply yet unreceived server message in the same chat
|
||||
return MessageInputReplyTo{message_id, reply_dialog_id, std::move(quote)};
|
||||
}
|
||||
if (!for_draft && top_thread_message_id.is_valid() && top_thread_message_id.is_server()) {
|
||||
|
Loading…
Reference in New Issue
Block a user