diff --git a/lib/Push.php b/lib/Push.php index 86bef0aad..11b091f8d 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -94,8 +94,7 @@ public function pushToDevice(INotification $notification) { $userKey = $this->keyManager->getKey($user); - $isTalkNotification = \in_array($notification->getApp(), ['spreed', 'talk'], true) - && \in_array($notification->getSubject(), ['invitation', 'call', 'mention'], true); + $isTalkNotification = \in_array($notification->getApp(), ['spreed', 'talk'], true); $talkApps = array_filter($devices, function($device) { return $device['apptype'] === 'talk'; }); diff --git a/tests/Unit/PushTest.php b/tests/Unit/PushTest.php index 610e4dbea..c545e6fff 100644 --- a/tests/Unit/PushTest.php +++ b/tests/Unit/PushTest.php @@ -536,15 +536,10 @@ public function testPushToDeviceTalkNotification(array $deviceTypes, $isTalkNoti $notification->expects($this->once()) ->method('getApp') ->willReturn('spreed'); - $notification->expects($this->once()) - ->method('getSubject') - ->willReturn('call'); } else { $notification->expects($this->once()) ->method('getApp') ->willReturn('notifications'); - $notification->expects($this->never()) - ->method('getSubject'); } /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */