diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 8c95b318..b68dbe49 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -18247,7 +18247,7 @@ Result MessagesManager::get_messag bool have_settings; int32 mute_until; std::tie(have_settings, mute_until) = get_dialog_mute_until(settings_dialog_id, settings_dialog); - if (have_settings && mute_until <= date) { + if (have_settings && mute_until > date) { return Status::Error("Ignore notification in muted chat"); } diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index c7d54dfa..179fc226 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -2702,6 +2702,8 @@ Status NotificationManager::process_push_notification_payload(string payload) { if (!sender_user_id.is_valid()) { return Status::Error("Receive invalid chat_from_id"); } + } else if (dialog_id.get_type() == DialogType::User) { + sender_user_id = dialog_id.get_user_id(); } TRY_RESULT(contains_mention_int, get_json_object_int_field(custom, "mention"));