diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2018-08-02 11:13:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-02 11:13:45 +0300 |
commit | 2feefb2b463effd2972e4ce5a163ac174905eb3b (patch) | |
tree | a128e8dd00c529db636a7de1a76fdaa06aad1a21 | |
parent | f80a485e97d194ad6f7c215b50560fc08ce31e8d (diff) | |
parent | 03dfa995e9328d93c48d16c30946ca222ef41778 (diff) |
Merge pull request #147 from nextcloud/bugfix/noid/fix-notifications-for-one2one-chatsv14.0.0beta2
Fix notifications for one2one chats
-rw-r--r-- | lib/Push.php | 3 | ||||
-rw-r--r-- | tests/Unit/PushTest.php | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/Push.php b/lib/Push.php index 86bef0a..11b091f 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -94,8 +94,7 @@ class Push { $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 610e4db..c545e6f 100644 --- a/tests/Unit/PushTest.php +++ b/tests/Unit/PushTest.php @@ -536,15 +536,10 @@ class PushTest extends TestCase { $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 */ |