mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Push: Bail out of notification job early if no subscriptions found
Change-Id: Ica8e5c0496171dba4315c27072c2d865eb747e78
This commit is contained in:
parent
153db72ec4
commit
657e914513
|
@ -15,6 +15,9 @@ class NotificationRequestJob extends Job {
|
|||
$echoServices = EchoServices::getInstance();
|
||||
$subscriptionManager = $echoServices->getPushSubscriptionManager();
|
||||
$subscriptions = $subscriptionManager->getSubscriptionsForUser( $centralId );
|
||||
if ( count( $subscriptions ) === 0 ) {
|
||||
return true;
|
||||
}
|
||||
$serviceClient = $echoServices->getPushNotificationServiceClient();
|
||||
$serviceClient->sendCheckEchoRequests( $subscriptions );
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue