Do not repair participant_count in deactivated chats.

GitOrigin-RevId: 3795e3e3571f4c580b70335470acf826f5b0e492
This commit is contained in:
levlam 2019-09-16 03:54:09 +03:00
parent f29c4a9ed1
commit 7fdaf3c530

View File

@ -8529,7 +8529,7 @@ void ContactsManager::on_update_chat_participant_count(Chat *c, ChatId chat_id,
}
if (c->participant_count != participant_count) {
if (version == c->version) {
if (version == c->version && participant_count != 0) {
// version is not changed when deleted user is removed from the chat
LOG_IF(ERROR, c->participant_count != participant_count + 1)
<< "Member count of " << chat_id << " has changed from " << c->participant_count << " to "