Fix message handling during logging out.

GitOrigin-RevId: 6542058eb0fcec8e2693db5f5f8abf725c4d4ed7
This commit is contained in:
levlam 2020-08-24 13:43:54 +03:00
parent 59265a41f5
commit 1c6f778e8d

View File

@ -3764,7 +3764,7 @@ unique_ptr<MessageContent> get_message_content(Td *td, FormattedText message,
tl_object_ptr<telegram_api::MessageMedia> &&media,
DialogId owner_dialog_id, bool is_content_read, UserId via_bot_user_id,
int32 *ttl) {
if (!td->auth_manager_->is_authorized() && !G()->close_flag() && media != nullptr) {
if (!td->auth_manager_->was_authorized() && !G()->close_flag() && media != nullptr) {
LOG(ERROR) << "Receive without authorization " << to_string(media);
media = nullptr;
}