Merge pull request #14082 from annando/issue-14055

Issue 14055: Set link to group server for group posts
This commit is contained in:
Tobias Diekershoff 2024-04-08 07:31:53 +02:00 committed by GitHub
commit 0a88d5a94a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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'],