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

Allow restricting forwards in groups / channels.

This commit is contained in:
John Preston
2021-11-05 18:03:17 +04:00
parent 431e3035af
commit 9be47f0870
11 changed files with 105 additions and 13 deletions

View File

@@ -504,6 +504,11 @@ void ApiWrap::sendMessageFail(
scheduled.removeSending(item);
Ui::show(Box<Ui::InformBox>(tr::lng_cant_do_this(tr::now)));
}
} else if (error.type() == qstr("CHAT_FORWARDS_RESTRICTED")) {
Ui::ShowMultilineToast({ .text = { peer->isBroadcast()
? tr::lng_error_noforwards_channel(tr::now)
: tr::lng_error_noforwards_group(tr::now)
}, .duration = kJoinErrorDuration });
}
if (const auto item = _session->data().message(itemId)) {
Assert(randomId != 0);