fix(MailPlugin): Use correct type for exact id match

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/60728/head
provokateurin 3 months ago
parent 17fa2c7605
commit d92aac8f7d
No known key found for this signature in database
  1. 2
      lib/private/Collaboration/Collaborators/MailPlugin.php
  2. 2
      tests/lib/Collaboration/Collaborators/MailPluginTest.php

@ -154,7 +154,7 @@ class MailPlugin implements ISearchPlugin {
'shareWithDisplayNameUnique' => !empty($emailAddress) ? $emailAddress : $cloud->getUser()
]];
$searchResult->addResultSet($userType, [], $singleResult);
$searchResult->markExactIdMatch($emailType);
$searchResult->markExactIdMatch($userType);
}
return false;
}

@ -575,7 +575,7 @@ class MailPluginTest extends TestCase {
$moreResults = $this->plugin->search($searchTerm, 2, 0, $this->searchResult);
$result = $this->searchResult->asArray();
$this->assertSame($expectedExactIdMatch, $this->searchResult->hasExactIdMatch(new SearchResultType('emails')));
$this->assertSame($expectedExactIdMatch, $this->searchResult->hasExactIdMatch(new SearchResultType('users')));
$this->assertEquals($expectedResult, $result);
$this->assertSame($expectedMoreResults, $moreResults);
}

Loading…
Cancel
Save