diff options
author | Joas Schilling <coding@schilljs.com> | 2016-11-22 22:46:18 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-11-22 22:46:18 +0100 |
commit | a36d26950e473bb27e7fd6931d7914d355dfc02d (patch) | |
tree | 119543933e1c6b11dbdfbe8df8a1396c751bdd88 /apps/files_sharing/lib/Activity | |
parent | 7b0b7e801f23e3115cfb43ea777171d0a443eb8c (diff) | |
download | nextcloud-server-a36d26950e473bb27e7fd6931d7914d355dfc02d.tar.gz nextcloud-server-a36d26950e473bb27e7fd6931d7914d355dfc02d.zip |
Only do stuff when its a remote-share activity
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing/lib/Activity')
-rw-r--r-- | apps/files_sharing/lib/Activity/Providers/RemoteShares.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php index c7906b84970..8760733a261 100644 --- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php +++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php @@ -159,10 +159,10 @@ class RemoteShares implements IProvider { $subject = $event->getSubject(); $parameters = $event->getSubjectParameters(); - $remoteUser = explode('@', $parameters[0], 2); switch ($subject) { case self::SUBJECT_REMOTE_SHARE_RECEIVED: case self::SUBJECT_REMOTE_SHARE_UNSHARED: + $remoteUser = explode('@', $parameters[0], 2); return [ 'file' => [ 'type' => 'pending-federated-share', @@ -178,6 +178,7 @@ class RemoteShares implements IProvider { ]; case self::SUBJECT_REMOTE_SHARE_ACCEPTED: case self::SUBJECT_REMOTE_SHARE_DECLINED: + $remoteUser = explode('@', $parameters[0], 2); return [ 'file' => $this->generateFileParameter($event->getObjectId(), $event->getObjectName()), 'user' => [ @@ -188,7 +189,7 @@ class RemoteShares implements IProvider { ], ]; } - return []; + throw new \InvalidArgumentException(); } /** |