Expose CLOUD federation for local users as well

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/23379/head
John Molakvoæ (skjnldsv) 6 years ago
parent fd452e5531
commit 698d4f55f2
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
  1. 4
      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());

Loading…
Cancel
Save