Skip to content
Snippets Groups Projects
Commit 1f672773 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

proxy server: respect value priority for push notifications

parent 374fdd6c
No related branches found
No related tags found
No related merge requests found
......@@ -706,7 +706,10 @@ DhtProxyServer::subscribe(restinio::request_handle_t request,
}
json["exp"] = ss.str();
}
sendPushNotification(pushToken, std::move(json), isAndroid, !expired);
auto maxPrio = 1000u;
for (const auto& v : values)
maxPrio = std::min(maxPrio, v->priority);
sendPushNotification(pushToken, std::move(json), isAndroid, !expired and maxPrio == 0);
return true;
}
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment