From ba83c2c5fc9f43a07f3680dfd8adf59b235841de Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 12 Feb 2018 15:20:18 +0300 Subject: [PATCH] Fix call to GetNotifySettingsQuery. GitOrigin-RevId: 377df0fdce5245fb3a880fca19261411d322cec2 --- td/telegram/MessagesManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 4a888885..8019af52 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -2907,7 +2907,7 @@ class GetNotifySettingsQuery : public Td::ResultHandler { void send(NotificationSettingsScope scope) { scope_ = scope; auto input_notify_peer = td->messages_manager_->get_input_notify_peer(scope); - CHECK(input_notify_peer != nullptr) << scope; + CHECK(input_notify_peer != nullptr); send_query(G()->net_query_creator().create( create_storer(telegram_api::account_getNotifySettings(std::move(input_notify_peer))))); } @@ -2968,7 +2968,7 @@ class UpdateNotifySettingsQuery : public Td::ResultHandler { LOG(INFO) << "Receive error for set notification settings: " << status; status.ignore(); - if (!td->auth_manager_->is_bot()) { + if (!td->auth_manager_->is_bot() && td->messages_manager_->get_input_notify_peer(scope_) != nullptr) { // trying to repair notification settings for this scope td->create_handler(Promise<>())->send(scope_); }