From: Mikael Nordfeldth Date: Sat, 5 Dec 2015 15:18:59 +0000 (+0100) Subject: Full identifiers for Autocomplete, less confusing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4fecda58ff1539f4ba249c9daad048eecfd255d4;p=quix0rs-gnu-social.git Full identifiers for Autocomplete, less confusing --- 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'); }