Do not send dialog actions by anonymous administrators.
GitOrigin-RevId: c67c1fc5b2ca97fb4a261d224af42b0be49f6807
This commit is contained in:
parent
f5572725c5
commit
a925c22469
@ -20470,8 +20470,9 @@ bool MessagesManager::is_anonymous_administrator(UserId sender_user_id, DialogId
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECK(author_signature != nullptr);
|
if (author_signature != nullptr) {
|
||||||
*author_signature = status.get_rank();
|
*author_signature = status.get_rank();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27310,6 +27311,9 @@ bool MessagesManager::is_dialog_action_unneded(DialogId dialog_id) const {
|
|||||||
if (is_broadcast_channel(dialog_id)) {
|
if (is_broadcast_channel(dialog_id)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (is_anonymous_administrator(td_->contacts_manager_->get_my_id(), dialog_id, nullptr)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
auto dialog_type = dialog_id.get_type();
|
auto dialog_type = dialog_id.get_type();
|
||||||
if (dialog_type == DialogType::User || dialog_type == DialogType::SecretChat) {
|
if (dialog_type == DialogType::User || dialog_type == DialogType::SecretChat) {
|
||||||
|
Loading…
Reference in New Issue
Block a user