Browse Source

Add type to Remote and Mail plugins

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v15.0.0beta1
Julius Härtl 5 years ago
parent
commit
870e01518d
No account linked to committer's email address

+ 3
- 1
lib/private/Collaboration/Collaborators/MailPlugin.php View File

@@ -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,

+ 3
- 1
lib/private/Collaboration/Collaborators/RemotePlugin.php View File

@@ -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,

Loading…
Cancel
Save