]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Transmitter.php
Fix: Mentions in the HTML part of the "contentMap" now are links
[friendica.git] / src / Protocol / ActivityPub / Transmitter.php
index 82ee97c9ededb6732852499608607582e0fcb85d..545ac22c699b0a668cfe486c7d17f617dd01d123 100644 (file)
@@ -1270,7 +1270,10 @@ class Transmitter
                        $data['content'] = BBCode::convert($body, false, 9);
                }
 
-               $data['contentMap']['text/html'] = BBCode::convert($item['body'], false);
+               $regexp = "/[@!]\[url\=([^\[\]]*)\].*?\[\/url\]/ism";
+               $richbody = preg_replace_callback($regexp, ['self', 'mentionCallback'], $item['body']);
+
+               $data['contentMap']['text/html'] = BBCode::convert($richbody, false);
                $data['contentMap']['text/markdown'] = BBCode::toMarkdown($item["body"]);
 
                $data['source'] = ['content' => $item['body'], 'mediaType' => "text/bbcode"];