Allow owner to clear basic group history for everyone.
This commit is contained in:
parent
0375704460
commit
977ebca580
@ -7547,7 +7547,7 @@ void ContactsManager::delete_chat_participant(ChatId chat_id, UserId user_id, bo
|
||||
if (c->status.is_left()) {
|
||||
if (user_id == my_id) {
|
||||
if (revoke_messages) {
|
||||
return td_->messages_manager_->delete_dialog_history(DialogId(chat_id), true, true, std::move(promise));
|
||||
return td_->messages_manager_->delete_dialog_history(DialogId(chat_id), true, false, std::move(promise));
|
||||
}
|
||||
return promise.set_value(Unit());
|
||||
} else {
|
||||
|
@ -21441,8 +21441,9 @@ td_api::object_ptr<td_api::chat> MessagesManager::get_chat_object(const Dialog *
|
||||
}
|
||||
break;
|
||||
case DialogType::Chat:
|
||||
// chats can be deleted only for self with deleteChatHistory
|
||||
// chats can be deleted only for self with deleteChatHistory and for everyone by their creator
|
||||
can_delete_for_self = true;
|
||||
can_delete_for_all_users = td_->contacts_manager_->get_chat_status(d->dialog_id.get_chat_id()).is_creator();
|
||||
break;
|
||||
case DialogType::Channel:
|
||||
if (is_broadcast_channel(d->dialog_id) ||
|
||||
|
Loading…
Reference in New Issue
Block a user