X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FAutocomplete%2Factions%2Fautocomplete.php;fp=plugins%2FAutocomplete%2Factions%2Fautocomplete.php;h=d5370fe0e1e66eeaf383de3cf62fdaec58342c9b;hb=4fecda58ff1539f4ba249c9daad048eecfd255d4;hp=56df4eb6d8b6c205c2775745d33ab2297a01c238;hpb=376d545082f027789b59b100b8af572c74e9de62;p=quix0rs-gnu-social.git diff --git a/plugins/Autocomplete/actions/autocomplete.php b/plugins/Autocomplete/actions/autocomplete.php index 56df4eb6d8..d5370fe0e1 100644 --- a/plugins/Autocomplete/actions/autocomplete.php +++ b/plugins/Autocomplete/actions/autocomplete.php @@ -141,10 +141,13 @@ class AutocompleteAction extends Action $results = array(); foreach($this->profiles as $profile){ $avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE); + $acct = $profile->getAcctUri(); + $identifier = split(':', $profile->getAcctUri(), 2)[1]; $results[] = array( - 'value' => '@'.$profile->nickname, - 'nickname' => $profile->nickname, - 'label'=> $profile->getFancyName(), + 'value' => '@'.$identifier, + 'nickname' => $profile->getNickname(), + 'acct_uri' => $acct, + 'label'=> "${identifier} (".$profile->getFullname().")", 'avatar' => $avatarUrl, 'type' => 'user' ); @@ -156,10 +159,13 @@ class AutocompleteAction extends Action } else { $avatarUrl = User_group::defaultLogo(AVATAR_MINI_SIZE); } + $acct = $profile->getAcctUri(); + $identifier = split(':', $profile->getAcctUri(), 2)[1]; $results[] = array( - 'value' => '!'.$group->nickname, - 'nickname' => $group->nickname, - 'label'=> $group->getFancyName(), + 'value' => '!'.$group->getNickname(), + 'nickname' => $group->getNickname(), + 'acct_uri' => $acct, + 'label'=> "${identifier} (".$group->getFullname().")", 'avatar' => $avatarUrl, 'type' => 'group'); }