summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Activity
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-22 22:46:18 +0100
committerJoas Schilling <coding@schilljs.com>2016-11-22 22:46:18 +0100
commita36d26950e473bb27e7fd6931d7914d355dfc02d (patch)
tree119543933e1c6b11dbdfbe8df8a1396c751bdd88 /apps/files_sharing/lib/Activity
parent7b0b7e801f23e3115cfb43ea777171d0a443eb8c (diff)
downloadnextcloud-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.php5
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();
}
/**