diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index 6878cff48..72526041e 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -992,6 +992,12 @@ void NotificationManager::flush_pending_updates(int32 group_id, const char *sour // deletion, because number of notification should never exceed max_notification_group_size_, // and second addition, because we has kept the deletion + // TODO remove when the bug is fixed + string debug_updates; + for (auto &update : updates) { + debug_updates += PSTRING() << as_notification_update(update.get()); + } + // calculate last state of all notifications std::unordered_set added_notification_ids; std::unordered_set edited_notification_ids; @@ -1003,7 +1009,7 @@ void NotificationManager::flush_pending_updates(int32 group_id, const char *sour for (auto ¬ification : update_ptr->added_notifications_) { auto notification_id = notification->id_; bool is_inserted = added_notification_ids.insert(notification_id).second; - CHECK(is_inserted); // there must be no additions after addition + LOG_CHECK(is_inserted) << debug_updates; // there must be no additions after addition CHECK(edited_notification_ids.count(notification_id) == 0); // there must be no additions after edit removed_notification_ids.erase(notification_id); }