mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
proxy server: respect value priority for push notifications
This commit is contained in:
1 parent
374fdd6cc9
commit
1f672773ba
1 file changed
+4
-1
@@ -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;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user