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

Update API scheme to layer 115.

This commit is contained in:
John Preston
2020-07-01 18:19:25 +04:00
parent 9370e87c54
commit 638d4d63c5
17 changed files with 414 additions and 224 deletions

View File

@@ -1645,7 +1645,7 @@ void ApiWrap::requestSelfParticipant(not_null<ChannelData*> channel) {
}).fail([=](const RPCError &error) {
_selfParticipantRequests.erase(channel);
if (error.type() == qstr("CHANNEL_PRIVATE")) {
channel->markForbidden();
channel->privateErrorReceived();
}
finalize(-1, 0);
}).afterDelay(kSmallDelayMs).send();
@@ -1962,6 +1962,9 @@ void ApiWrap::joinChannel(not_null<ChannelData*> channel) {
applyUpdates(result);
}).fail([=](const RPCError &error) {
if (error.type() == qstr("CHANNEL_PRIVATE")
&& channel->invitePeekExpires()) {
channel->privateErrorReceived();
} else if (error.type() == qstr("CHANNEL_PRIVATE")
|| error.type() == qstr("CHANNEL_PUBLIC_GROUP_NA")
|| error.type() == qstr("USER_BANNED_IN_CHANNEL")) {
Ui::show(Box<InformBox>(channel->isMegagroup()