Use the name as name

pull/8520/head
Michael 2020-04-15 20:45:04 +00:00
rodzic 3ff607deee
commit 472518f0b5
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -600,6 +600,12 @@ class Processor
$fields['type'] = Term::IMPLICIT_MENTION;
$fields['name'] = substr($fields['name'], 1);
}
if (!empty($tag['href'])) {
$apcontact = APContact::getByURL($tag['href']);
if (!empty($apcontact['name'])) {
$fields['name'] = $apcontact['name'];
}
}
} elseif ($tag['type'] == 'Hashtag') {
$fields['type'] = Term::HASHTAG;
if (substr($fields['name'], 0, 1) == Term::TAG_CHARACTER[Term::HASHTAG]) {

Wyświetl plik

@ -1834,7 +1834,7 @@ class Diaspora
continue;
}
$fields = ['uri-id' => $uriid, 'name' => substr($person['addr'], 0, 64), 'url' => $person['url']];
$fields = ['uri-id' => $uriid, 'name' => substr($person['name'] ?: $person['nick'], 0, 64), 'url' => $person['url']];
if ($match[1] == Term::TAG_CHARACTER[Term::MENTION]) {
$fields['type'] = Term::MENTION;