Do not send dialog actions by anonymous administrators.

GitOrigin-RevId: c67c1fc5b2ca97fb4a261d224af42b0be49f6807
This commit is contained in:
levlam 2020-09-11 22:01:55 +03:00
parent f5572725c5
commit a925c22469

View File

@ -20470,8 +20470,9 @@ bool MessagesManager::is_anonymous_administrator(UserId sender_user_id, DialogId
return false;
}
CHECK(author_signature != nullptr);
*author_signature = status.get_rank();
if (author_signature != nullptr) {
*author_signature = status.get_rank();
}
return true;
}
@ -27310,6 +27311,9 @@ bool MessagesManager::is_dialog_action_unneded(DialogId dialog_id) const {
if (is_broadcast_channel(dialog_id)) {
return true;
}
if (is_anonymous_administrator(td_->contacts_manager_->get_my_id(), dialog_id, nullptr)) {
return true;
}
auto dialog_type = dialog_id.get_type();
if (dialog_type == DialogType::User || dialog_type == DialogType::SecretChat) {