From 665316c14dabe05112692a0ba0fa9af3775aeceb Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 31 Jan 2024 19:09:57 +0100 Subject: [PATCH] Issue 13859: Posts to a group in "Vier" is now possible (#13864) --- src/Module/Contact/Conversations.php | 11 +++++++++-- src/Module/Conversation/Network.php | 4 +--- view/templates/widget/vcard.tpl | 3 --- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Module/Contact/Conversations.php b/src/Module/Contact/Conversations.php index 544e9e7330..d47933c63b 100644 --- a/src/Module/Contact/Conversations.php +++ b/src/Module/Contact/Conversations.php @@ -27,11 +27,13 @@ use Friendica\Contact\LocalRelationship\Repository\LocalRelationship; use Friendica\Content\Conversation; use Friendica\Content\Nav; use Friendica\Content\Widget; +use Friendica\Core\ACL; use Friendica\Core\L10n; use Friendica\Core\Protocol; use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Theme; use Friendica\Model; +use Friendica\Model\Contact as ModelContact; use Friendica\Module\Contact; use Friendica\Module\Response; use Friendica\Module\Security\Login; @@ -109,8 +111,13 @@ class Conversations extends BaseModule Nav::setSelected('contact'); - // We need the editor here to be able to reshare an item. - $o = $this->conversation->statusEditor([], 0, true); + $options = [ + 'lockstate' => ACL::getLockstateForUserId($this->userSession->getLocalUserId()) ? 'lock' : 'unlock', + 'acl' => ACL::getFullSelectorHTML($this->page, $this->userSession->getLocalUserId(), true, []), + 'bang' => '', + 'content' => ($contact['contact-type'] == ModelContact::TYPE_COMMUNITY ? '!' : '@') . ($contact['addr'] ?: $contact['url']), + ]; + $o = $this->conversation->statusEditor($options); $o .= Contact::getTabsHTML($contact, Contact::TAB_CONVERSATIONS); $o .= Model\Contact::getThreadsFromId($contact['id'], $this->userSession->getLocalUserId(), 0, 0, $request['last_created'] ?? ''); diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index 5b764f74d7..01bec06411 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -162,8 +162,6 @@ class Network extends Timeline Nav::setSelected($this->args->get(0)); - $content = ''; - $default_permissions = []; if ($this->circleId) { $default_permissions['allow_gid'] = [$this->circleId]; @@ -195,7 +193,7 @@ class Network extends Timeline 'lockstate' => $this->circleId || $this->network || ACL::getLockstateForUserId($this->session->getLocalUserId()) ? 'lock' : 'unlock', 'acl' => ACL::getFullSelectorHTML($this->page, $this->session->getLocalUserId(), true, $default_permissions), 'bang' => (($this->circleId || $this->network) ? '!' : ''), - 'content' => $content, + 'content' => '', ]; $o .= $this->conversation->statusEditor($x); diff --git a/view/templates/widget/vcard.tpl b/view/templates/widget/vcard.tpl index 2656be487e..788b78f12e 100644 --- a/view/templates/widget/vcard.tpl +++ b/view/templates/widget/vcard.tpl @@ -41,9 +41,6 @@ {{if $wallmessage_link}}
  • {{$wallmessage}}
  • {{/if}} - {{if $mention_link}} -
  • {{$mention}}
  • - {{/if}} {{if $showgroup_link}}
  • {{$showgroup}}
  • {{/if}}