From a2da42640c10ca66647c5de15c078b52e441ae40 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 7 Apr 2024 15:46:55 +0000 Subject: [PATCH] Issue 14055: Set link to group server for group posts --- src/Model/Item.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Model/Item.php b/src/Model/Item.php index a8c76cfa30..cb9d40ae8a 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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'],