summaryrefslogtreecommitdiffstats
path: root/lib/Model
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-01-11 09:35:36 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-02-05 15:25:20 -0100
commit20b8e0a51aa80e192f058de3a50a439962f0bf0b (patch)
tree817f78fb2fa273e8a5332e619bf28ce79487db7a /lib/Model
parent9c6c164b895483f86fa03772b6cba9f0e440fc89 (diff)
remove '#' from remote Notes
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/ActivityPub/Object/Note.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Model/ActivityPub/Object/Note.php b/lib/Model/ActivityPub/Object/Note.php
index 71501f26..e7cdac71 100644
--- a/lib/Model/ActivityPub/Object/Note.php
+++ b/lib/Model/ActivityPub/Object/Note.php
@@ -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);