diff --git a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php index 4bcc13a97a6ef..4135d83b5af3b 100644 --- a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php +++ b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php @@ -156,9 +156,6 @@ private function generateCard(RecentContact $contact): string { 'CATEGORIES' => $this->l10n->t('Recently contacted'), ]; - if ($contact->getUid() !== null) { - $props['X-NEXTCLOUD-UID'] = $contact->getUid(); - } if ($contact->getEmail() !== null) { $props['EMAIL'] = $contact->getEmail(); } diff --git a/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php b/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php index 1fb5345162de8..026859168f5de 100644 --- a/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php +++ b/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php @@ -110,7 +110,6 @@ protected function createRecentContact(string $email = null, string $federatedCl 'URI' => UUIDUtil::getUUID(), 'FN' => 'Foo Bar', 'CATEGORIES' => 'Recently contacted', - 'X-NEXTCLOUD-UID' => 'foobar', ]; $time = $this->time->getDateTime(); diff --git a/apps/files_sharing/lib/Listener/ShareInteractionListener.php b/apps/files_sharing/lib/Listener/ShareInteractionListener.php index e698d16d823ea..67c5e04b1e31b 100644 --- a/apps/files_sharing/lib/Listener/ShareInteractionListener.php +++ b/apps/files_sharing/lib/Listener/ShareInteractionListener.php @@ -72,6 +72,7 @@ public function handle(Event $event): void { 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 @@ public function handle(Event $event): void { 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());