mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed spam reporting in moderation box.
This commit is contained in:
parent
d40951f068
commit
14e8b8fb91
1 changed files with 5 additions and 8 deletions
|
@ -465,14 +465,11 @@ void CreateModerateMessagesBox(
|
||||||
handleConfirmation(report, controller, [=](
|
handleConfirmation(report, controller, [=](
|
||||||
not_null<PeerData*> p,
|
not_null<PeerData*> p,
|
||||||
not_null<ChannelData*> c) {
|
not_null<ChannelData*> c) {
|
||||||
auto filtered = QVector<MTPint>();
|
auto filtered = ranges::views::all(
|
||||||
for (const auto &id : ids) {
|
ids
|
||||||
if (const auto item = p->session().data().message(id)) {
|
) | ranges::views::transform([](const FullMsgId &id) {
|
||||||
if (item->from() == p) {
|
return MTP_int(id.msg);
|
||||||
filtered.push_back(MTP_int(item->fullId().msg));
|
}) | ranges::to<QVector<MTPint>>();
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
c->session().api().request(
|
c->session().api().request(
|
||||||
MTPchannels_ReportSpam(
|
MTPchannels_ReportSpam(
|
||||||
c->inputChannel,
|
c->inputChannel,
|
||||||
|
|
Loading…
Add table
Reference in a new issue