From 6376ed09d0065e8f0227fb003eac7a1a4fb680bc Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 11 Apr 2019 17:13:42 +0300 Subject: [PATCH] Silence unneeded notification log event errors. GitOrigin-RevId: 5f2d00d2575162944f80f2691d5b896950e93d35 --- td/telegram/AnimationsManager.cpp | 2 +- td/telegram/NotificationManager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index 9f5b82a31..e2735111e 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -318,7 +318,7 @@ tl_object_ptr AnimationsManager::get_input_media( attributes.push_back(make_tl_object(animation->file_name)); } string mime_type = animation->mime_type; - if (animation->mime_type == "video/mp4") { + if (mime_type == "video/mp4") { attributes.push_back(make_tl_object( 0, false /*ignored*/, false /*ignored*/, animation->duration, animation->dimensions.width, animation->dimensions.height)); diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index b801fc36d..053a65799 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -3970,7 +3970,7 @@ void NotificationManager::on_binlog_events(vector &&events) { log_event.sender_name_, log_event.date_, log_event.contains_mention_, true, log_event.loc_key_, log_event.arg_, log_event.photo_, log_event.document_, log_event.notification_id_, event.id_, PromiseCreator::lambda([](Result result) { - if (result.is_error()) { + if (result.is_error() && result.error().code() != 200 && result.error().code() != 406) { LOG(ERROR) << "Receive error " << result.error() << ", while processing message push notification"; } })); @@ -3984,7 +3984,7 @@ void NotificationManager::on_binlog_events(vector &&events) { edit_message_push_notification( log_event.dialog_id_, log_event.message_id_, log_event.edit_date_, log_event.loc_key_, log_event.arg_, log_event.photo_, log_event.document_, event.id_, PromiseCreator::lambda([](Result result) { - if (result.is_error()) { + if (result.is_error() && result.error().code() != 200 && result.error().code() != 406) { LOG(ERROR) << "Receive error " << result.error() << ", while processing edit message push notification"; } }));