mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Fix wronly marking channel as forbidden.
Regression was introduced in 826d6011a1
.
Fixes #5923.
This commit is contained in:
parent
08cd46cd4c
commit
2518250ae0
1 changed files with 3 additions and 3 deletions
|
@ -1661,9 +1661,6 @@ void ApiWrap::requestSelfParticipant(not_null<ChannelData*> channel) {
|
|||
}
|
||||
|
||||
const auto finalize = [=](UserId inviter, TimeId inviteDate) {
|
||||
if (inviter < 0) {
|
||||
channel->markForbidden();
|
||||
}
|
||||
channel->inviter = inviter;
|
||||
channel->inviteDate = inviteDate;
|
||||
if (const auto history = _session->data().historyLoaded(channel)) {
|
||||
|
@ -1708,6 +1705,9 @@ void ApiWrap::requestSelfParticipant(not_null<ChannelData*> channel) {
|
|||
});
|
||||
}).fail([=](const RPCError &error) {
|
||||
_selfParticipantRequests.erase(channel);
|
||||
if (error.type() == qstr("CHANNEL_PRIVATE")) {
|
||||
channel->markForbidden();
|
||||
}
|
||||
finalize(-1, 0);
|
||||
}).afterDelay(kSmallDelayMs).send();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue