Left trim at sign from nicks in ACL
This commit is contained in:
parent
b9c0c114fb
commit
05a5e1792d
|
@ -629,12 +629,12 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
);
|
);
|
||||||
if (dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach ($r as $row) {
|
foreach ($r as $row) {
|
||||||
// nickname..
|
|
||||||
$up = parse_url($row['author-link']);
|
$up = parse_url($row['author-link']);
|
||||||
$nick = explode("/",$up['path']);
|
$nick = explode('/', $up['path']);
|
||||||
$nick = $nick[count($nick)-1];
|
// Fix for Mastodon URLs with format https://domain.tld/@nick
|
||||||
$nick .= "@".$up['host'];
|
$nick = ltrim($nick[count($nick) - 1], '@');
|
||||||
// /nickname
|
$nick .= '@' . $up['host'];
|
||||||
|
|
||||||
$unknow_contacts[] = array(
|
$unknow_contacts[] = array(
|
||||||
'type' => 'c',
|
'type' => 'c',
|
||||||
'photo' => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO),
|
'photo' => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/* ACL selector json backend */
|
/* ACL selector json backend */
|
||||||
|
|
||||||
require_once("include/acl_selectors.php");
|
require_once 'include/acl_selectors.php';
|
||||||
|
|
||||||
function acl_init(App $a) {
|
function acl_init(App $a) {
|
||||||
acl_lookup($a);
|
acl_lookup($a);
|
||||||
|
|
Loading…
Reference in a new issue