diff options
author | Vitor Mattos <vitor@php.rio> | 2022-04-20 16:00:23 +0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2022-04-20 17:10:04 +0300 |
commit | 31373cef9d354ed3b815cc2d1b7ec2a111425217 (patch) | |
tree | 5ddbd84235ec75fa58ad4793da11692b7189ee77 /lib/Share | |
parent | 9b9d30b9f7ef266af317c17ca33c157451027ba8 (diff) |
Move system message listeners to static methods
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Share')
-rw-r--r-- | lib/Share/RoomShareProvider.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Share/RoomShareProvider.php b/lib/Share/RoomShareProvider.php index 28dbfef15..eee33bc82 100644 --- a/lib/Share/RoomShareProvider.php +++ b/lib/Share/RoomShareProvider.php @@ -71,6 +71,8 @@ class RoomShareProvider implements IShareProvider { public const TALK_FOLDER = '/Talk'; public const TALK_FOLDER_PLACEHOLDER = '/{TALK_PLACEHOLDER}'; + public const EVENT_SHARE_FILE_AGAIN = self::class . '::shareFileAgain'; + private IDBConnection $dbConnection; private ISecureRandom $secureRandom; private IShareManager $shareManager; @@ -153,7 +155,7 @@ class RoomShareProvider implements IShareProvider { foreach ($existingShares as $existingShare) { if ($existingShare->getSharedWith() === $share->getSharedWith()) { // FIXME Should be moved away from GenericEvent as soon as OCP\Share20\IManager did move too - $this->dispatcher->dispatch(self::class . '::' . 'share_file_again', new GenericEvent($existingShare)); + $this->dispatcher->dispatch(self::EVENT_SHARE_FILE_AGAIN, new GenericEvent($existingShare)); throw new GenericShareException('Already shared', $this->l->t('Path is already shared with this room'), 403); } } |