]> git.mxchange.org Git - friendica.git/commitdiff
Issue 14055: Set link to group server for group posts
authorMichael <heluecht@pirati.ca>
Sun, 7 Apr 2024 15:46:55 +0000 (15:46 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 7 Apr 2024 15:46:55 +0000 (15:46 +0000)
src/Model/Item.php

index a8c76cfa302d97616abede1b1f77772e31d5dd6c..cb9d40ae8a6e9d1df1ae557ae6c18196edc413b4 100644 (file)
@@ -3990,6 +3990,13 @@ class Item
                        $plink = $item['uri'];
                }
 
+               if (($item['post-reason'] == self::PR_ANNOUNCEMENT) && ($item['owner-contact-type'] == Contact::TYPE_COMMUNITY) && ($item['owner-network'] == Protocol::DFRN)) {
+                       $contact = Contact::getById($item['owner-id'], ['baseurl']);
+                       if (!empty($contact['baseurl'])) {
+                               $plink = $contact['baseurl'] . '/display/' . $item['guid'];
+                       }
+               }
+
                if (DI::userSession()->getLocalUserId()) {
                        $ret = [
                                'href' => "display/" . $item['guid'],