Issue 10966: Ignore "only sharer" setting for forum accounts
This commit is contained in:
parent
4ad528a15c
commit
695d6ce461
|
@ -2947,7 +2947,7 @@ class Contact
|
||||||
*/
|
*/
|
||||||
public static function isForum($contactid)
|
public static function isForum($contactid)
|
||||||
{
|
{
|
||||||
$fields = ['forum', 'prv'];
|
$fields = ['contact-type', 'forum', 'prv'];
|
||||||
$condition = ['id' => $contactid];
|
$condition = ['id' => $contactid];
|
||||||
$contact = DBA::selectFirst('contact', $fields, $condition);
|
$contact = DBA::selectFirst('contact', $fields, $condition);
|
||||||
if (!DBA::isResult($contact)) {
|
if (!DBA::isResult($contact)) {
|
||||||
|
@ -2955,7 +2955,7 @@ class Contact
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is it a forum?
|
// Is it a forum?
|
||||||
return ($contact['forum'] || $contact['prv']);
|
return (($contact['contact-type'] == self::TYPE_COMMUNITY) || $contact['forum'] || $contact['prv']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -619,7 +619,7 @@ class Processor
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DI::pConfig()->get($receiver, 'system', 'accept_only_sharer', false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
|
if (!Contact::isForum($receiver) && DI::pConfig()->get($receiver, 'system', 'accept_only_sharer', false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
|
||||||
$skip = !Contact::isSharingByURL($activity['author'], $receiver);
|
$skip = !Contact::isSharingByURL($activity['author'], $receiver);
|
||||||
|
|
||||||
if ($skip && (($activity['type'] == 'as:Announce') || ($item['isForum'] ?? false))) {
|
if ($skip && (($activity['type'] == 'as:Announce') || ($item['isForum'] ?? false))) {
|
||||||
|
|
Loading…
Reference in a new issue