Fix saving new channels to database.

GitOrigin-RevId: 77074cfbec8299dfc0be9ba70a79afc1e7c3256a
This commit is contained in:
levlam 2020-02-22 17:04:15 +03:00
parent c77a576e83
commit 6a56320b06

View File

@ -7373,7 +7373,7 @@ void ContactsManager::on_load_channel_from_database(ChannelId channel_id, string
} else {
CHECK(!c->is_saved); // channel can't be saved before load completes
CHECK(!c->is_being_saved);
if (c->participant_count == 0) {
if (c->participant_count == 0 && !value.empty()) {
Channel temp_c;
log_event_parse(temp_c, value).ensure();
if (temp_c.participant_count != 0) {