Fix secret chat creation.

This commit is contained in:
levlam 2023-04-15 11:39:22 +03:00
parent cfe57dbd60
commit b171040808

View File

@ -166,8 +166,6 @@ void SecretChatsManager::on_update_chat(tl_object_ptr<telegram_api::updateEncryp
}
PendingChatUpdate pending_update;
pending_update.online_process_time_ = Timestamp::now();
pending_update.update_ = std::move(update);
if (update->chat_->get_id() == telegram_api::encryptedChatRequested::ID) {
#if TD_ANDROID || TD_DARWIN_IOS || TD_DARWIN_WATCH_OS || TD_TIZEN
pending_update.offline_process_time_ = Timestamp::in(1.0);
@ -176,6 +174,8 @@ void SecretChatsManager::on_update_chat(tl_object_ptr<telegram_api::updateEncryp
pending_update.offline_process_time_ = Timestamp::in(3.0);
#endif
}
pending_update.update_ = std::move(update);
pending_chat_updates_.push_back(std::move(pending_update));
flush_pending_chat_updates();
}