Skip to content

Commit

Permalink
Moderation on context menu album delete.
Browse files Browse the repository at this point in the history
Fixes #28012.
  • Loading branch information
john-preston committed Jun 6, 2024
1 parent deb50ee commit 9e77e80
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Telegram/SourceFiles/history/history_inner_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4350,10 +4350,16 @@ void HistoryInner::deleteAsGroup(FullMsgId itemId) {
const auto group = session().data().groups().find(item);
if (!group) {
return deleteItem(item);
} else if (CanCreateModerateMessagesBox(group->items)) {
_controller->show(Box(
CreateModerateMessagesBox,
group->items,
nullptr));
} else {
_controller->show(Box<DeleteMessagesBox>(
&session(),
session().data().itemsToIds(group->items)));
}
_controller->show(Box<DeleteMessagesBox>(
&session(),
session().data().itemsToIds(group->items)));
}
}

Expand Down

0 comments on commit 9e77e80

Please sign in to comment.