mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed ability to moderate messages from channel authors.
This commit is contained in:
parent
6f752357d7
commit
321490e528
1 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,16 @@ ModerateOptions CalculateModerateOptions(const HistoryItemsList &items) {
|
||||||
if (peer != item->history()->peer) {
|
if (peer != item->history()->peer) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
const auto author = item->author();
|
||||||
|
if (author == peer) {
|
||||||
|
return {};
|
||||||
|
} else if (const auto channel = author->asChannel()) {
|
||||||
|
if (channel->linkedChat() == peer) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!item->suggestBanReport()) {
|
if (!item->suggestBanReport()) {
|
||||||
result.allCanBan = false;
|
result.allCanBan = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue