mirror of
https://github.com/friendica/friendica
synced 2025-05-10 07:04:15 +02:00
Disallow posting to restricted groups
This commit is contained in:
parent
a3a8b6c9ec
commit
dace658d5d
3 changed files with 29 additions and 15 deletions
|
@ -86,7 +86,7 @@ class Conversations extends BaseModule
|
|||
throw new NotFoundException($this->t('Contact not found.'));
|
||||
}
|
||||
|
||||
$contact = Model\Contact::getById($pcid);
|
||||
$contact = Model\Contact::getAccountById($pcid);
|
||||
if (empty($contact)) {
|
||||
throw new NotFoundException($this->t('Contact not found.'));
|
||||
}
|
||||
|
@ -111,13 +111,15 @@ class Conversations extends BaseModule
|
|||
|
||||
Nav::setSelected('contact');
|
||||
|
||||
$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);
|
||||
if (!$contact['ap-posting-restricted']) {
|
||||
$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'] ?? '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue