Skip to content

Commit

Permalink
iOS: use high priority for resubscribe notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
katekm committed Sep 18, 2023
1 parent 8b91c24 commit ed18fa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dht_proxy_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed18fa9

Please sign in to comment.