Skip to content

Commit 6f10862

Browse files
committed
fix: always show email address for suggestions from address collector
Signed-off-by: Daniel Kesselberg <[email protected]>
1 parent 4b1b6ca commit 6f10862

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Service/AutoCompletion/AutoCompleteService.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ public function findMatches(string $userId, string $term): array {
3737

3838
// Convert collected addresses into same format as CI creates
3939
$recipientsFromCollector = array_map(static function (CollectedAddress $address) {
40+
$label = ($address->getDisplayName())
41+
? $address->getDisplayName() . ' (' . $address->getEmail() . ')'
42+
: $address->getEmail();
43+
4044
return [
4145
'id' => $address->getId(),
42-
'label' => $address->getDisplayName(),
46+
'label' => $label,
4347
'email' => $address->getEmail(),
4448
];
4549
}, $fromCollector);

0 commit comments

Comments
 (0)