Fix call to on_update_secret_chat_state.
GitOrigin-RevId: 110b1b4fe066ae3cfa064baa9d861653cb284222
This commit is contained in:
parent
a6bb57d3dd
commit
3c6008aa9c
@ -6358,6 +6358,11 @@ void ContactsManager::update_secret_chat(SecretChat *c, SecretChatId secret_chat
|
||||
DialogId dialog_id(secret_chat_id);
|
||||
send_closure_later(G()->messages_manager(), &MessagesManager::force_create_dialog, dialog_id, "update secret chat",
|
||||
true);
|
||||
if (c->is_state_changed) {
|
||||
send_closure_later(G()->messages_manager(), &MessagesManager::on_update_secret_chat_state, secret_chat_id,
|
||||
c->state);
|
||||
c->is_state_changed = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!from_database) {
|
||||
@ -8910,7 +8915,7 @@ void ContactsManager::on_update_secret_chat(SecretChatId secret_chat_id, int64 a
|
||||
if (state != SecretChatState::Unknown && state != secret_chat->state) {
|
||||
secret_chat->state = state;
|
||||
secret_chat->need_send_update = true;
|
||||
td_->messages_manager_->on_update_secret_chat_state(secret_chat_id, state);
|
||||
secret_chat->is_state_changed = true;
|
||||
}
|
||||
if (is_outbound != secret_chat->is_outbound) {
|
||||
secret_chat->is_outbound = is_outbound;
|
||||
|
@ -664,6 +664,7 @@ class ContactsManager : public Actor {
|
||||
|
||||
bool is_outbound = false;
|
||||
|
||||
bool is_state_changed = true;
|
||||
bool is_changed = true; // have new changes not sent to the database except changes visible to the client
|
||||
bool need_send_update = true; // have new changes not sent to the client
|
||||
|
||||
|
@ -19274,7 +19274,7 @@ void MessagesManager::on_create_new_dialog_fail(int64 random_id, Status error, P
|
||||
}
|
||||
|
||||
void MessagesManager::on_dialog_photo_updated(DialogId dialog_id) {
|
||||
auto d = get_dialog(dialog_id);
|
||||
auto d = get_dialog(dialog_id); // called from update_user, must not create the dialog
|
||||
if (d != nullptr && d->is_update_new_chat_sent) {
|
||||
send_closure(G()->td(), &Td::send_update,
|
||||
make_tl_object<td_api::updateChatPhoto>(
|
||||
@ -19283,7 +19283,7 @@ void MessagesManager::on_dialog_photo_updated(DialogId dialog_id) {
|
||||
}
|
||||
|
||||
void MessagesManager::on_dialog_title_updated(DialogId dialog_id) {
|
||||
auto d = get_dialog(dialog_id);
|
||||
auto d = get_dialog(dialog_id); // called from update_user, must not create the dialog
|
||||
if (d != nullptr) {
|
||||
update_dialogs_hints(d);
|
||||
if (d->is_update_new_chat_sent) {
|
||||
|
Loading…
Reference in New Issue
Block a user