diff --git a/include/acl_selectors.php b/include/acl_selectors.php index f4b644d68..8404c8f4b 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -627,14 +627,14 @@ function acl_lookup(App $a, $out_type = 'json') { dbesc($search), implode("','", $known_contacts) ); - if (dbm::is_result($r)){ + if (dbm::is_result($r)) { foreach ($r as $row) { - // nickname.. $up = parse_url($row['author-link']); - $nick = explode("/",$up['path']); - $nick = $nick[count($nick)-1]; - $nick .= "@".$up['host']; - // /nickname + $nick = explode('/', $up['path']); + // Fix for Mastodon URLs with format https://domain.tld/@nick + $nick = ltrim($nick[count($nick) - 1], '@'); + $nick .= '@' . $up['host']; + $unknow_contacts[] = array( 'type' => 'c', 'photo' => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO), diff --git a/mod/acl.php b/mod/acl.php index 04aa9f50a..9220bc77a 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -1,7 +1,7 @@