Fix updating of channel member count.
GitOrigin-RevId: f6f49994937d68bbe175a619d37d19900de756f6
This commit is contained in:
parent
13cfc54b31
commit
b8c300b05b
@ -9080,8 +9080,8 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
|
|||||||
return promise.set_value(Unit());
|
return promise.set_value(Unit());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto participant_count =
|
bool have_participant_count = (channel_full->flags_ & CHANNEL_FULL_FLAG_HAS_PARTICIPANT_COUNT) != 0;
|
||||||
(channel_full->flags_ & CHANNEL_FULL_FLAG_HAS_PARTICIPANT_COUNT) != 0 ? channel_full->participants_count_ : 0;
|
auto participant_count = have_participant_count ? channel_full->participants_count_ : 0;
|
||||||
auto administrator_count =
|
auto administrator_count =
|
||||||
(channel_full->flags_ & CHANNEL_FULL_FLAG_HAS_ADMINISTRATOR_COUNT) != 0 ? channel_full->admins_count_ : 0;
|
(channel_full->flags_ & CHANNEL_FULL_FLAG_HAS_ADMINISTRATOR_COUNT) != 0 ? channel_full->admins_count_ : 0;
|
||||||
auto restricted_count =
|
auto restricted_count =
|
||||||
@ -9127,7 +9127,7 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
|
|||||||
|
|
||||||
channel->is_changed = true;
|
channel->is_changed = true;
|
||||||
|
|
||||||
if (participant_count != 0 && c->participant_count != participant_count) {
|
if (have_participant_count && c->participant_count != participant_count) {
|
||||||
c->participant_count = participant_count;
|
c->participant_count = participant_count;
|
||||||
c->is_changed = true;
|
c->is_changed = true;
|
||||||
update_channel(c, channel_id);
|
update_channel(c, channel_id);
|
||||||
|
Reference in New Issue
Block a user