]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #4845 from annando/diaspora-forums
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 15 Apr 2018 20:35:30 +0000 (16:35 -0400)
committerGitHub <noreply@github.com>
Sun, 15 Apr 2018 20:35:30 +0000 (16:35 -0400)
Forum posts now show the author when posted to Diaspora

src/Protocol/Diaspora.php

index f8e4c11b241b382b6d362a38f859b16a110bdb43..5d69b13d753585ff724f39f525bb1b4f910ea5e4 100644 (file)
@@ -3760,6 +3760,12 @@ class Diaspora
                        $title = $item["title"];
                        $body = $item["body"];
 
+                       if ($item['author-link'] != $item['owner-link']) {
+                               require_once 'mod/share.php';
+                               $body = share_header($item['author-name'], $item['author-link'], $item['author-avatar'],
+                                       "", $item['created'], $item['plink']) . $body . '[/share]';
+                       }
+
                        // convert to markdown
                        $body = html_entity_decode(BBCode::toMarkdown($body));