mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-25 08:15:35 +00:00
24 lines
555 B
PHP
24 lines
555 B
PHP
|
<?php
|
||
|
|
||
|
namespace EchoPush;
|
||
|
|
||
|
use EchoServices;
|
||
|
use Job;
|
||
|
|
||
|
class NotificationRequestJob extends Job {
|
||
|
|
||
|
/**
|
||
|
* @return bool success
|
||
|
*/
|
||
|
public function run(): bool {
|
||
|
$centralId = $this->params['centralId'];
|
||
|
$echoServices = EchoServices::getInstance();
|
||
|
$subscriptionManager = $echoServices->getPushSubscriptionManager();
|
||
|
$subscriptions = $subscriptionManager->getSubscriptionsForUser( $centralId );
|
||
|
$serviceClient = $echoServices->getPushNotificationServiceClient();
|
||
|
$serviceClient->sendCheckEchoRequest( $subscriptions );
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
}
|