Disable message threads in non-root messages in non-linked groups.
GitOrigin-RevId: 71b2b3cdcf413353a76adb9524ddfdf5fe89b972
This commit is contained in:
parent
ecf9ea23ac
commit
8d2c2e586e
@ -16178,6 +16178,10 @@ Result<FullMessageId> MessagesManager::get_top_thread_full_message_id(DialogId d
|
||||
if (!m->message_id.is_server()) {
|
||||
return Status::Error(400, "Message thread is unavailable for the message");
|
||||
}
|
||||
if (m->top_thread_message_id != m->message_id &&
|
||||
!td_->contacts_manager_->get_channel_has_linked_channel(dialog_id.get_channel_id())) {
|
||||
return Status::Error(400, "Root message must be used to get the message thread");
|
||||
}
|
||||
return FullMessageId{dialog_id, m->top_thread_message_id};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user