Delete photo from *FullInfo before sending update*.
This commit is contained in:
parent
6ec127587e
commit
32795d50a1
@ -10967,6 +10967,12 @@ void ContactsManager::update_chat(Chat *c, ChatId chat_id, bool from_binlog, boo
|
|||||||
c->is_noforwards_changed = false;
|
c->is_noforwards_changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (need_update_chat_full) {
|
||||||
|
auto chat_full = get_chat_full(chat_id);
|
||||||
|
CHECK(chat_full != nullptr);
|
||||||
|
update_chat_full(chat_full, chat_id, "drop_chat_photos");
|
||||||
|
}
|
||||||
|
|
||||||
LOG(DEBUG) << "Update " << chat_id << ": need_save_to_database = " << c->need_save_to_database
|
LOG(DEBUG) << "Update " << chat_id << ": need_save_to_database = " << c->need_save_to_database
|
||||||
<< ", is_changed = " << c->is_changed;
|
<< ", is_changed = " << c->is_changed;
|
||||||
c->need_save_to_database |= c->is_changed;
|
c->need_save_to_database |= c->is_changed;
|
||||||
@ -10994,12 +11000,6 @@ void ContactsManager::update_chat(Chat *c, ChatId chat_id, bool from_binlog, boo
|
|||||||
LOG(INFO) << "Repairing cache of " << chat_id;
|
LOG(INFO) << "Repairing cache of " << chat_id;
|
||||||
reload_chat(chat_id, Promise<Unit>());
|
reload_chat(chat_id, Promise<Unit>());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (need_update_chat_full) {
|
|
||||||
auto chat_full = get_chat_full(chat_id);
|
|
||||||
CHECK(chat_full != nullptr);
|
|
||||||
update_chat_full(chat_full, chat_id, "drop_chat_photos");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContactsManager::update_channel(Channel *c, ChannelId channel_id, bool from_binlog, bool from_database) {
|
void ContactsManager::update_channel(Channel *c, ChannelId channel_id, bool from_binlog, bool from_database) {
|
||||||
@ -11089,6 +11089,12 @@ void ContactsManager::update_channel(Channel *c, ChannelId channel_id, bool from
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (need_update_channel_full) {
|
||||||
|
auto channel_full = get_channel_full(channel_id, true, "update_channel");
|
||||||
|
CHECK(channel_full != nullptr);
|
||||||
|
update_channel_full(channel_full, channel_id, "update_channel");
|
||||||
|
}
|
||||||
|
|
||||||
LOG(DEBUG) << "Update " << channel_id << ": need_save_to_database = " << c->need_save_to_database
|
LOG(DEBUG) << "Update " << channel_id << ": need_save_to_database = " << c->need_save_to_database
|
||||||
<< ", is_changed = " << c->is_changed;
|
<< ", is_changed = " << c->is_changed;
|
||||||
c->need_save_to_database |= c->is_changed;
|
c->need_save_to_database |= c->is_changed;
|
||||||
@ -11129,12 +11135,6 @@ void ContactsManager::update_channel(Channel *c, ChannelId channel_id, bool from
|
|||||||
LOG(INFO) << "Repairing cache of " << channel_id;
|
LOG(INFO) << "Repairing cache of " << channel_id;
|
||||||
reload_channel(channel_id, Promise<Unit>());
|
reload_channel(channel_id, Promise<Unit>());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (need_update_channel_full) {
|
|
||||||
auto channel_full = get_channel_full(channel_id, true, "update_channel");
|
|
||||||
CHECK(channel_full != nullptr);
|
|
||||||
update_channel_full(channel_full, channel_id, "update_channel");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContactsManager::update_secret_chat(SecretChat *c, SecretChatId secret_chat_id, bool from_binlog,
|
void ContactsManager::update_secret_chat(SecretChat *c, SecretChatId secret_chat_id, bool from_binlog,
|
||||||
|
Loading…
Reference in New Issue
Block a user