Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-10-12 15:55:02 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-10-12 21:51:53 +0300
commita9a552ec95697768c99f70e1b4f860fb4cfe7512 (patch)
treed90c8f4d3a44899a3da630ea25204b518aae9dc4 /apps/files_sharing/lib
parent830d911507371cba9dad58952b1deacafbbf5d81 (diff)
Expose CLOUD federation for local users as well
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Listener/ShareInteractionListener.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Listener/ShareInteractionListener.php b/apps/files_sharing/lib/Listener/ShareInteractionListener.php
index e698d16d823..67c5e04b1e3 100644
--- a/apps/files_sharing/lib/Listener/ShareInteractionListener.php
+++ b/apps/files_sharing/lib/Listener/ShareInteractionListener.php
@@ -72,6 +72,7 @@ class ShareInteractionListener implements IEventListener {
return;
}
$actor = $this->userManager->get($share->getSharedBy());
+ $sharedWith = $this->userManager->get($share->getSharedWith());
if ($actor === null) {
$this->logger->warning('Share was not created by a user, can\'t emit interaction event');
return;
@@ -80,6 +81,9 @@ class ShareInteractionListener implements IEventListener {
switch ($share->getShareType()) {
case IShare::TYPE_USER:
$interactionEvent->setUid($share->getSharedWith());
+ if ($sharedWith !== null) {
+ $interactionEvent->setFederatedCloudId($sharedWith->getCloudId());
+ }
break;
case IShare::TYPE_EMAIL:
$interactionEvent->setEmail($share->getSharedWith());