diff options
author | Joas Schilling <coding@schilljs.com> | 2024-02-12 17:23:53 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-02-14 08:04:48 +0100 |
commit | 2bfa2987f6b22f7f8eeada60b62dc0dfb25b2b3d (patch) | |
tree | ca0a104857272a5d8aeb3b21c1c13ca95c919bc8 /lib/Federation/CloudFederationProviderTalk.php | |
parent | 020add24618487c8a7b73fa4c04ed18ae37dee4e (diff) |
feat(federation): Add inviter information to the invitations DB for serving
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Federation/CloudFederationProviderTalk.php')
-rw-r--r-- | lib/Federation/CloudFederationProviderTalk.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Federation/CloudFederationProviderTalk.php b/lib/Federation/CloudFederationProviderTalk.php index 0a331cdb4..fc3f6c682 100644 --- a/lib/Federation/CloudFederationProviderTalk.php +++ b/lib/Federation/CloudFederationProviderTalk.php @@ -121,20 +121,20 @@ class CloudFederationProviderTalk implements ICloudFederationProvider { $roomToken = $share->getResourceName(); $roomName = $share->getProtocol()['roomName']; $roomType = (int) $roomType; - $sharedBy = $share->getSharedByDisplayName(); + $sharedByDisplayName = $share->getSharedByDisplayName(); $sharedByFederatedId = $share->getSharedBy(); - $owner = $share->getOwnerDisplayName(); + $ownerDisplayName = $share->getOwnerDisplayName(); $ownerFederatedId = $share->getOwner(); [, $remote] = $this->addressHandler->splitUserRemote($ownerFederatedId); - // if no explicit information about the person who created the share was send + // if no explicit information about the person who created the share was sent // we assume that the share comes from the owner if ($sharedByFederatedId === null) { - $sharedBy = $owner; + $sharedByDisplayName = $ownerDisplayName; $sharedByFederatedId = $ownerFederatedId; } - if ($remote && $shareSecret && $shareWith && $roomToken && $remoteId && is_string($roomName) && $roomName && $owner) { + if ($remote && $shareSecret && $shareWith && $roomToken && $remoteId && is_string($roomName) && $roomName && $ownerDisplayName) { $shareWith = $this->userManager->get($shareWith); if ($shareWith === null) { $this->logger->debug('Received a federation invite for user that could not be found'); @@ -151,9 +151,9 @@ class CloudFederationProviderTalk implements ICloudFederationProvider { throw new ProviderCouldNotAddShareException('User does not exist', '', Http::STATUS_BAD_REQUEST); } - $invite = $this->federationManager->addRemoteRoom($shareWith, (int) $remoteId, $roomType, $roomName, $roomToken, $remote, $shareSecret); + $invite = $this->federationManager->addRemoteRoom($shareWith, (int) $remoteId, $roomType, $roomName, $roomToken, $remote, $shareSecret, $sharedByFederatedId, $sharedByDisplayName); - $this->notifyAboutNewShare($shareWith, (string) $invite->getId(), $sharedByFederatedId, $sharedBy, $roomName, $roomToken, $remote); + $this->notifyAboutNewShare($shareWith, (string) $invite->getId(), $sharedByFederatedId, $sharedByDisplayName, $roomName, $roomToken, $remote); return (string) $invite->getId(); } |