Don't add self speculatively to channel members if join requests are enabled in the chat.
This commit is contained in:
parent
6c91b9aa6b
commit
2a41ab0562
|
@ -7243,7 +7243,9 @@ void ContactsManager::add_channel_participant(ChannelId channel_id, UserId user_
|
||||||
return promise.set_error(Status::Error(400, "Can't return to kicked from chat"));
|
return promise.set_error(Status::Error(400, "Can't return to kicked from chat"));
|
||||||
}
|
}
|
||||||
|
|
||||||
speculative_add_channel_user(channel_id, user_id, DialogParticipantStatus::Member(), c->status);
|
if (!get_channel_join_request(c)) {
|
||||||
|
speculative_add_channel_user(channel_id, user_id, DialogParticipantStatus::Member(), c->status);
|
||||||
|
}
|
||||||
td_->create_handler<JoinChannelQuery>(std::move(promise))->send(channel_id);
|
td_->create_handler<JoinChannelQuery>(std::move(promise))->send(channel_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue