@@ -447,7 +447,7 @@ public function proxyPushToDevice(int $id, IUser $user, array $devices, INotific
447447
448448 $ this ->printInfo ('' );
449449 $ this ->printInfo ('Found ' . count ($ devices ) . ' devices registered for push notifications ' );
450- $ isTalkNotification = \in_array ( $ notification -> getApp (), [ ' spreed ' , ' talk ' , ' admin_notification_talk ' ], true );
450+
451451 $ devices = $ this ->filterProxyDeviceList ($ devices , $ notification ->getApp ());
452452 if (empty ($ devices )) {
453453 $ this ->printInfo ('<comment>No devices left after filtering</comment> ' );
@@ -461,7 +461,7 @@ public function proxyPushToDevice(int $id, IUser $user, array $devices, INotific
461461 $ this ->printInfo ('Device token: ' . $ device ['token ' ]);
462462
463463 try {
464- $ payload = json_encode ($ this ->encryptAndSign ($ userKey ->getPrivate (), $ device , $ id , $ notification, $ isTalkNotification ), JSON_THROW_ON_ERROR );
464+ $ payload = json_encode ($ this ->encryptAndSign ($ userKey ->getPrivate (), $ device , $ id , $ notification ), JSON_THROW_ON_ERROR );
465465
466466 $ proxyServer = rtrim ($ device ['proxyserver ' ], '/ ' );
467467 if (!isset ($ this ->payloadsToSend [$ proxyServer ])) {
@@ -952,13 +952,12 @@ protected function getNotifTopicAndUrgency(string $app, string $type): array {
952952 * @param array $device
953953 * @param int $id
954954 * @param INotification $notification
955- * @param bool $isTalkNotification
956955 * @return array
957956 * @psalm-return array{deviceIdentifier: string, pushTokenHash: string, subject: string, signature: string, priority: string, type: string}
958957 * @throws InvalidTokenException
959958 * @throws \InvalidArgumentException
960959 */
961- protected function encryptAndSign (string $ userPrivateKey , array $ device , int $ id , INotification $ notification, bool $ isTalkNotification ): array {
960+ protected function encryptAndSign (string $ userPrivateKey , array $ device , int $ id , INotification $ notification ): array {
962961 $ data = $ this ->encodeNotif ($ id , $ notification , 200 );
963962 $ ret = $ this ->getNotifTopicAndUrgency ($ data ['app ' ], $ data ['type ' ]);
964963 $ priority = $ ret ['urgency ' ];
0 commit comments