diff options
-rw-r--r-- | lib/private/Collaboration/Collaborators/MailPlugin.php | 4 | ||||
-rw-r--r-- | lib/private/Collaboration/Collaborators/RemotePlugin.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php index 9abbc0f3afd..e89e22d012e 100644 --- a/lib/private/Collaboration/Collaborators/MailPlugin.php +++ b/lib/private/Collaboration/Collaborators/MailPlugin.php @@ -87,7 +87,7 @@ class MailPlugin implements ISearchPlugin { if (!is_array($emailAddresses)) { $emailAddresses = [$emailAddresses]; } - foreach ($emailAddresses as $emailAddress) { + foreach ($emailAddresses as $type => $emailAddress) { $displayName = $emailAddress; if (isset($contact['FN'])) { $displayName = $contact['FN'] . ' (' . $emailAddress . ')'; @@ -163,6 +163,7 @@ class MailPlugin implements ISearchPlugin { $result['exact'][] = [ 'label' => $displayName, 'uuid' => $contact['UID'], + 'type' => $type, 'value' => [ 'shareType' => Share::SHARE_TYPE_EMAIL, 'shareWith' => $emailAddress, @@ -172,6 +173,7 @@ class MailPlugin implements ISearchPlugin { $result['wide'][] = [ 'label' => $displayName, 'uuid' => $contact['UID'], + 'type' => $type, 'value' => [ 'shareType' => Share::SHARE_TYPE_EMAIL, 'shareWith' => $emailAddress, diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php index af28c97c108..bde6d15b7b6 100644 --- a/lib/private/Collaboration/Collaborators/RemotePlugin.php +++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php @@ -71,7 +71,7 @@ class RemotePlugin implements ISearchPlugin { $cloudIds = [$cloudIds]; } $lowerSearch = strtolower($search); - foreach ($cloudIds as $cloudId) { + foreach ($cloudIds as $type => $cloudId) { try { list($remoteUser, $serverUrl) = $this->splitUserRemote($cloudId); } catch (\InvalidArgumentException $e) { @@ -90,6 +90,7 @@ class RemotePlugin implements ISearchPlugin { $result['exact'][] = [ 'label' => $contact['FN'] . " ($cloudId)", 'uuid' => $contact['UID'], + 'type' => $type, 'value' => [ 'shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => $cloudId, @@ -100,6 +101,7 @@ class RemotePlugin implements ISearchPlugin { $result['wide'][] = [ 'label' => $contact['FN'] . " ($cloudId)", 'uuid' => $contact['UID'], + 'type' => $type, 'value' => [ 'shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => $cloudId, |