2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Allow deleting small groups for everyone.

This commit is contained in:
John Preston
2021-01-21 17:31:27 +04:00
parent 58733ba6ea
commit 417428b21d
4 changed files with 54 additions and 11 deletions

View File

@@ -2350,14 +2350,14 @@ void ApiWrap::deleteHistory(
deleteTillId = history->lastMessage()->id;
}
if (const auto channel = peer->asChannel()) {
if (!justClear) {
if (!justClear && !revoke) {
channel->ptsWaitingForShortPoll(-1);
leaveChannel(channel);
} else {
if (const auto migrated = peer->migrateFrom()) {
deleteHistory(migrated, justClear, revoke);
}
if (IsServerMsgId(deleteTillId)) {
if (IsServerMsgId(deleteTillId) || (!justClear && revoke)) {
history->owner().histories().deleteAllMessages(
history,
deleteTillId,