2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Added handler for SCHEDULE_STATUS_PRIVATE error when send file.

This commit is contained in:
23rd
2020-01-26 21:32:19 +03:00
committed by John Preston
parent ef5055f4f3
commit e7fbcce9d9
3 changed files with 29 additions and 0 deletions

View File

@@ -579,6 +579,13 @@ void ApiWrap::sendMessageFail(
requestFullPeer(peer);
}
}
} else if (error.type() == qstr("SCHEDULE_STATUS_PRIVATE")) {
auto &scheduled = _session->data().scheduledMessages();
Assert(peer->isUser());
if (const auto item = scheduled.lookupItem(peer->id, itemId.msg)) {
scheduled.removeSending(item);
Ui::show(Box<InformBox>(tr::lng_cant_do_this(tr::now)));
}
}
if (const auto item = _session->data().message(itemId)) {
Assert(randomId != 0);