Skip to content
Snippets Groups Projects
Commit ed18fa91 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

iOS: use high priority for resubscribe notifications

parent 8b91c244
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment