From ed18fa915ec8726b0a19f38066a5c22e35e4390c Mon Sep 17 00:00:00 2001 From: Kateryna Kostiuk Date: Mon, 18 Sep 2023 12:15:06 -0400 Subject: [PATCH] iOS: use high priority for resubscribe notifications --- src/dht_proxy_server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 8abc7f4f2..4ac338d9d 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -1095,12 +1095,14 @@ DhtProxyServer::sendPushNotification(const std::string& token, Json::Value&& jso notification["expiration"] = exp; if (!topic.empty()) notification["topic"] = topic; - if (highPriority) { + auto isResubscribe = !notification["data"]["timeout"].isNull(); + if (highPriority || isResubscribe) { Json::Value alert(Json::objectValue); alert["title"]="hello"; notification["push_type"] = "alert"; notification["alert"] = alert; notification["mutable_content"] = true; + notification["priority"] = "high"; } else { notification["push_type"] = "background"; notification["content_available"] = true;