Disable online member count calculation for bots.
GitOrigin-RevId: a53e92a44fab9375c9af318c08d119d398e2e0a6
This commit is contained in:
parent
8bb1747ef6
commit
285b590058
@ -7123,6 +7123,10 @@ void ContactsManager::invalidate_user_full(UserId user_id) {
|
||||
|
||||
void ContactsManager::update_chat_online_member_count(const ChatFull *chat_full, ChatId chat_id,
|
||||
bool is_from_server) const {
|
||||
if (td_->auth_manager_->is_bot()) {
|
||||
return;
|
||||
}
|
||||
|
||||
int32 online_member_count = 0;
|
||||
int32 time = G()->unix_time();
|
||||
for (const auto &participant : chat_full->participants) {
|
||||
|
@ -5175,6 +5175,10 @@ void MessagesManager::on_update_channel_max_unavailable_message_id(ChannelId cha
|
||||
|
||||
void MessagesManager::on_update_dialog_online_member_count(DialogId dialog_id, int32 online_member_count,
|
||||
bool is_from_server) {
|
||||
if (td_->auth_manager_->is_bot()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dialog_id.is_valid()) {
|
||||
LOG(ERROR) << "Receive online member count in invalid " << dialog_id;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user