]> git.mxchange.org Git - friendica-addons.git/commitdiff
Bluesky: don't remove hashtags upon posting
authorMichael <heluecht@pirati.ca>
Sat, 8 Jul 2023 14:54:56 +0000 (14:54 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 8 Jul 2023 14:54:56 +0000 (14:54 +0000)
bluesky/bluesky.php

index c3e621f2b40cb930c3a4ad4a648bcaefd00d7541..d96766d714fdc85028bfa152ccdbee94151208ba 100644 (file)
@@ -659,8 +659,8 @@ function bluesky_create_post(array $item, stdClass $root = null, stdClass $paren
 
 function bluesky_get_urls(string $body): array
 {
-       // Remove all hashtags and mentions
-       $body = preg_replace("/([#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '', $body);
+       // Remove all hashtag and mention links
+       $body = preg_replace("/([#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '$1$3', $body);
 
        $urls = [];