]> git.mxchange.org Git - friendica.git/commitdiff
Use the contentMap to transmit additional content encodings
authorMichael <heluecht@pirati.ca>
Tue, 12 Nov 2019 20:22:35 +0000 (20:22 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 12 Nov 2019 20:22:35 +0000 (20:22 +0000)
src/Protocol/ActivityPub/Transmitter.php

index a7be1e9c5294b399fdb811d2dcaf526e21162aa8..82ee97c9ededb6732852499608607582e0fcb85d 100644 (file)
@@ -1270,6 +1270,9 @@ class Transmitter
                        $data['content'] = BBCode::convert($body, false, 9);
                }
 
+               $data['contentMap']['text/html'] = BBCode::convert($item['body'], false);
+               $data['contentMap']['text/markdown'] = BBCode::toMarkdown($item["body"]);
+
                $data['source'] = ['content' => $item['body'], 'mediaType' => "text/bbcode"];
 
                if (!empty($item['signed_text']) && ($item['uri'] != $item['thr-parent'])) {