remove '#' from remote Notes

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
test/oracle
Maxence Lange 2019-01-11 09:35:36 -01:00
rodzic 9c6c164b89
commit 20b8e0a51a
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -227,7 +227,11 @@ class Note extends ACore implements JsonSerializable {
$tags = $this->getTags('Hashtag');
$hashtags = [];
foreach ($tags as $tag) {
$hashtags[] = $tag['name'];
$hashtag = $tag['name'];
if (substr($hashtag, 0, 1) === '#') {
$hashtag = substr($hashtag, 1);
}
$hashtags[] = $hashtag;
}
$this->setHashtags($hashtags);