From: Michael Date: Fri, 17 May 2019 17:58:42 +0000 (+0000) Subject: Make AP "direct messages" more compatible to Mastodon X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f6fc70c4e2bee396fa3737b2c0b43de2025318c7;p=friendica.git Make AP "direct messages" more compatible to Mastodon --- diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 1b418a7a54..7576c95738 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -645,6 +645,12 @@ class Transmitter $reply = DBA::selectFirst('mail', ['uri'], ['parent-uri' => $mail['parent-uri'], 'reply' => false]); + // Making the post more compatible for Mastodon by: + // - Making it a note and not an article (no title) + // - Moving the title into the "summary" field that is used as a "content warning" + $mail['body'] = '[abstract]' . $mail['title'] . "[/abstract]\n".$mail['body']; + $mail['title'] = ''; + $mail['author-link'] = $mail['owner-link'] = $mail['from-url']; $mail['allow_cid'] = '<'.$mail['contact-id'].'>'; $mail['allow_gid'] = '';