Fix MessagesManager::can_delete_dialog.
This commit is contained in:
parent
80f3c88bdb
commit
c5dfa59782
@ -10996,6 +10996,7 @@ void MessagesManager::on_failed_scheduled_message_deletion(DialogId dialog_id, c
|
||||
}
|
||||
|
||||
MessagesManager::CanDeleteDialog MessagesManager::can_delete_dialog(const Dialog *d) const {
|
||||
if (is_dialog_sponsored(d)) {
|
||||
auto chat_source = sponsored_dialog_source_.get_chat_source_object();
|
||||
if (chat_source != nullptr) {
|
||||
switch (chat_source->get_id()) {
|
||||
@ -11006,6 +11007,7 @@ MessagesManager::CanDeleteDialog MessagesManager::can_delete_dialog(const Dialog
|
||||
return {false, false};
|
||||
}
|
||||
}
|
||||
}
|
||||
if (td_->auth_manager_->is_bot() || !have_input_peer(d->dialog_id, AccessRights::Read)) {
|
||||
return {false, false};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user