diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 8ec8df66469271a82d5594b6901eb7182540dc11..00123093f6734ae603309dac77a79ae45a19805b 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -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; } );