From 845946be45ceb866e97b4c10fd85832b5c3c7880 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 16 Mar 2019 17:27:12 +0300 Subject: [PATCH] Add FlushPendingNewMessageNotificationsSleepActor debug. GitOrigin-RevId: 5cca0228696b76cc2be4a0b036f95ade70bcba17 --- td/telegram/MessagesManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 7b043c71..ad360203 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -18828,9 +18828,12 @@ bool MessagesManager::add_new_message_notification(Dialog *d, Message *m, bool f VLOG(notifications) << "Delay new message notification for " << m->message_id << " in " << d->dialog_id << " with " << pending_notifications.size() << " already waiting messages"; if (pending_notifications.empty()) { + VLOG(notifications) << "Create FlushPendingNewMessageNotificationsSleepActor for " << d->dialog_id; create_actor("FlushPendingNewMessageNotificationsSleepActor", 5.0, PromiseCreator::lambda([actor_id = actor_id(this), dialog_id = d->dialog_id, from_mentions](Result result) { + VLOG(notifications) + << "Pending notifications timeout in " << dialog_id << " has expired"; send_closure(actor_id, &MessagesManager::flush_pending_new_message_notifications, dialog_id, from_mentions, DialogId()); })) @@ -18908,6 +18911,7 @@ void MessagesManager::flush_pending_new_message_notifications(DialogId dialog_id auto &pending_notifications = from_mentions ? d->pending_new_mention_notifications : d->pending_new_message_notifications; if (pending_notifications.empty()) { + VLOG(notifications) << "Have no pending notifications in " << dialog_id << " to flush"; return; } for (auto &it : pending_notifications) { @@ -23387,7 +23391,7 @@ void MessagesManager::fix_new_dialog(Dialog *d, unique_ptr &&last_datab << d->new_secret_chat_notification_id; VLOG(notifications) << "Have " << dialog_id << " with mention " << d->mention_notification_group.group_id << " with last " << d->mention_notification_group.last_notification_id << " sent at " - << d->mention_notification_group.last_notification_date << " and max removed " + << d->mention_notification_group.last_notification_date << ", max removed " << d->mention_notification_group.max_removed_notification_id << " and pinned message " << d->pinned_message_notification_message_id; }