summaryrefslogtreecommitdiffstats
path: root/lib/Notification/Listener.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-12-03 13:48:13 +0100
committerJoas Schilling <coding@schilljs.com>2019-12-04 08:36:59 +0100
commit81db771748c2a35c0d953d608c9996a3cdf02102 (patch)
tree7cb291a5df69ce3d60ac0bc71e577af09c8d8e28 /lib/Notification/Listener.php
parent0e1d2b39b92c77d2c58ef60c525677957713e546 (diff)
Add constants for event names and use pattern
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification/Listener.php')
-rw-r--r--lib/Notification/Listener.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Notification/Listener.php b/lib/Notification/Listener.php
index f272335ac..cb2a56cf7 100644
--- a/lib/Notification/Listener.php
+++ b/lib/Notification/Listener.php
@@ -66,28 +66,28 @@ class Listener {
$listener = \OC::$server->query(self::class);
$listener->generateInvitation($room, $event->getParticipants());
};
- $dispatcher->addListener(Room::class . '::postAddUsers', $listener);
+ $dispatcher->addListener(Room::EVENT_AFTER_USERS_ADD, $listener);
$listener = static function(JoinRoomUserEvent $event) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener->markInvitationRead($event->getRoom());
};
- $dispatcher->addListener(Room::class . '::postJoinRoom', $listener);
+ $dispatcher->addListener(Room::EVENT_AFTER_ROOM_CONNECT, $listener);
$listener = static function(RoomEvent $event) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener->generateCallNotifications($event->getRoom());
};
- $dispatcher->addListener(Room::class . '::preSessionJoinCall', $listener);
+ $dispatcher->addListener(Room::EVENT_BEFORE_SESSION_JOIN_CALL, $listener);
$listener = static function(RoomEvent $event) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener->markCallNotificationsRead($event->getRoom());
};
- $dispatcher->addListener(Room::class . '::postSessionJoinCall', $listener);
+ $dispatcher->addListener(Room::EVENT_AFTER_SESSION_JOIN_CALL, $listener);
}
/**