summaryrefslogtreecommitdiffstats
path: root/lib/Notification/Listener.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-05-13 08:57:24 +0200
committerJoas Schilling <coding@schilljs.com>2022-05-17 10:13:41 +0200
commit231c6a0d379341be2bce835fc9032a475e7c93bf (patch)
tree173b57586efd02d5fbf10755997f15831843d14d /lib/Notification/Listener.php
parentc15f9d831872e6be4a8214d7bac1c0725eacd119 (diff)
Use APP_ID constant
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification/Listener.php')
-rw-r--r--lib/Notification/Listener.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Notification/Listener.php b/lib/Notification/Listener.php
index 5ca34f052..f6913e67a 100644
--- a/lib/Notification/Listener.php
+++ b/lib/Notification/Listener.php
@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace OCA\Talk\Notification;
+use OCA\Talk\AppInfo\Application;
use OCA\Talk\Events\AddParticipantsEvent;
use OCA\Talk\Events\JoinRoomUserEvent;
use OCA\Talk\Events\RoomEvent;
@@ -123,7 +124,7 @@ class Listener implements IEventListener {
$shouldFlush = $this->notificationManager->defer();
$dateTime = $this->timeFactory->getDateTime();
try {
- $notification->setApp('spreed')
+ $notification->setApp(Application::APP_ID)
->setDateTime($dateTime)
->setObject('room', $room->getToken())
->setSubject('invitation', [
@@ -174,7 +175,7 @@ class Listener implements IEventListener {
$notification = $this->notificationManager->createNotification();
try {
- $notification->setApp('spreed')
+ $notification->setApp(Application::APP_ID)
->setUser($currentUser->getUID())
->setObject('room', $room->getToken())
->setSubject('invitation');
@@ -223,7 +224,7 @@ class Listener implements IEventListener {
$dateTime = $this->timeFactory->getDateTime();
try {
// Remove all old notifications for this room
- $notification->setApp('spreed')
+ $notification->setApp(Application::APP_ID)
->setObject('room', $room->getToken());
$this->notificationManager->markProcessed($notification);
@@ -281,7 +282,7 @@ class Listener implements IEventListener {
$notification = $this->notificationManager->createNotification();
try {
- $notification->setApp('spreed')
+ $notification->setApp(Application::APP_ID)
->setUser($currentUser->getUID())
->setObject('call', $room->getToken())
->setSubject('call');
@@ -302,7 +303,7 @@ class Listener implements IEventListener {
try {
// Remove previous call notifications
$notification = $this->notificationManager->createNotification();
- $notification->setApp('spreed')
+ $notification->setApp(Application::APP_ID)
->setObject('call', $room->getToken())
->setUser($target->getActorId());
$this->notificationManager->markProcessed($notification);