mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:50:11 +00:00
Relax comparison with pconfig system.accept_only_sharer value
- DI::pConfig()->get returns a string value, not an integer - Removed superfluous default values now that we aren't doing strict type checking
This commit is contained in:
parent
785ea0325e
commit
c376081d0d
3 changed files with 5 additions and 5 deletions
|
@ -651,7 +651,7 @@ class Processor
|
|||
if (
|
||||
!empty($activity['thread-children-type'])
|
||||
&& in_array($activity['thread-children-type'], Receiver::ACTIVITY_TYPES)
|
||||
&& DI::pConfig()->get($receiver, 'system', 'accept_only_sharer', Item::COMPLETION_COMMENT) !== Item::COMPLETION_LIKE
|
||||
&& DI::pConfig()->get($receiver, 'system', 'accept_only_sharer') != Item::COMPLETION_LIKE
|
||||
) {
|
||||
Logger::info('Top level post from thread completion from a non sharer had been initiated via an activity, ignoring',
|
||||
['type' => $activity['thread-children-type'], 'user' => $item['uid'], 'causer' => $item['causer-link'], 'author' => $activity['author'], 'url' => $item['uri']]);
|
||||
|
@ -668,7 +668,7 @@ class Processor
|
|||
}
|
||||
}
|
||||
|
||||
if (!$is_forum && DI::pConfig()->get($receiver, 'system', 'accept_only_sharer', Item::COMPLETION_COMMENT) === Item::COMPLETION_NONE && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
|
||||
if (!$is_forum && DI::pConfig()->get($receiver, 'system', 'accept_only_sharer') == Item::COMPLETION_NONE && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
|
||||
$skip = !Contact::isSharingByURL($activity['author'], $receiver);
|
||||
|
||||
if ($skip && (($activity['type'] == 'as:Announce') || ($item['isForum'] ?? false))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue