diff options
author | Joas Schilling <coding@schilljs.com> | 2019-12-03 15:48:13 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-12-04 10:36:59 +0300 |
commit | 81db771748c2a35c0d953d608c9996a3cdf02102 (patch) | |
tree | 7cb291a5df69ce3d60ac0bc71e577af09c8d8e28 /lib/Files | |
parent | 0e1d2b39b92c77d2c58ef60c525677957713e546 (diff) |
Add constants for event names and use pattern
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Files')
-rw-r--r-- | lib/Files/Listener.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Files/Listener.php b/lib/Files/Listener.php index 7b71ef820..d7cb4e8db 100644 --- a/lib/Files/Listener.php +++ b/lib/Files/Listener.php @@ -72,7 +72,7 @@ class Listener { $event->setCancelJoin(true); } }; - $dispatcher->addListener(Room::class . '::preJoinRoom', $listener); + $dispatcher->addListener(Room::EVENT_BEFORE_ROOM_CONNECT, $listener); $listener = static function(JoinRoomGuestEvent $event) { /** @var self $listener */ @@ -84,7 +84,7 @@ class Listener { $event->setCancelJoin( true); } }; - $dispatcher->addListener(Room::class . '::preJoinRoomGuest', $listener); + $dispatcher->addListener(Room::EVENT_BEFORE_GUEST_CONNECT, $listener); } /** |