}
$type = $_REQUEST['type'] ?? self::TYPE_MENTION_CONTACT_GROUP;
-
if ($type === self::TYPE_GLOBAL_CONTACT) {
$o = self::globalContactSearch();
} else {
$contacts[] = [
'photo' => Contact::getMicro($contact),
'name' => htmlspecialchars($contact['name']),
- 'nick' => $contact['nick'],
+ 'nick' => $contact['addr'] ?: $contact['url'],
'network' => $contact['network'],
'link' => $contact['url'],
'forum' => $contact['contact-type'] == Contact::TYPE_COMMUNITY,
'type' => 'c',
'photo' => Contact::getMicro($contact),
'name' => htmlspecialchars($contact['name']),
- 'id' => intval($contact['cid']),
+ 'id' => intval($contact['id']),
'network' => $contact['network'],
'link' => $contact['url'],
'nick' => htmlentities(($contact['nick'] ?? '') ?: $contact['addr']),