Allow bots to restrict left chat members without trying to add them.
GitOrigin-RevId: b2884da3cdc524634b23d1d149bdb66bc6fa206d
This commit is contained in:
parent
fa11870016
commit
e23ecdf572
@ -4390,6 +4390,10 @@ void ContactsManager::change_channel_participant_status_impl(ChannelId channel_i
|
||||
DialogParticipantStatus status,
|
||||
DialogParticipantStatus old_status,
|
||||
Promise<Unit> &&promise) {
|
||||
if (td_->auth_manager_->is_bot() && status.is_restricted() && status.is_member() && !old_status.is_member()) {
|
||||
// allow bots to restrict left chat members without trying to add them
|
||||
status.set_is_member(false);
|
||||
}
|
||||
if (old_status == status) {
|
||||
return promise.set_value(Unit());
|
||||
}
|
||||
|
Reference in New Issue
Block a user