Merge pull request #7831 from annando/contentmap

ActivityPub: Use the contentMap to transmit additional content encodings
This commit is contained in:
Hypolite Petovan 2019-11-12 16:30:36 -05:00 committed by GitHub
commit a8ace6522c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View 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'])) {