Merge pull request #11940 from annando/issue-11876
Issue 11876: Fix local message distribution
This commit is contained in:
commit
c12ac42695
|
@ -1552,14 +1552,16 @@ class Item
|
||||||
|
|
||||||
$item = array_merge($item, $fields);
|
$item = array_merge($item, $fields);
|
||||||
|
|
||||||
$item['post-reason'] = self::getPostReason($item);
|
if (($uid != 0) && Contact::isSharing(($item['gravity'] == GRAVITY_PARENT) ? $item['owner-id'] : $item['author-id'], $uid)) {
|
||||||
|
$item['post-reason'] = self::PR_FOLLOWER;
|
||||||
|
}
|
||||||
|
|
||||||
$is_reshare = ($item['gravity'] == GRAVITY_ACTIVITY) && ($item['verb'] == Activity::ANNOUNCE);
|
$is_reshare = ($item['gravity'] == GRAVITY_ACTIVITY) && ($item['verb'] == Activity::ANNOUNCE);
|
||||||
|
|
||||||
if (($uid != 0) && (($item['gravity'] == GRAVITY_PARENT) || $is_reshare) &&
|
if (($uid != 0) && (($item['gravity'] == GRAVITY_PARENT) || $is_reshare) &&
|
||||||
DI::pConfig()->get($uid, 'system', 'accept_only_sharer') == self::COMPLETION_NONE &&
|
DI::pConfig()->get($uid, 'system', 'accept_only_sharer') == self::COMPLETION_NONE &&
|
||||||
!in_array($item['post-reason'], [self::PR_FOLLOWER, self::PR_TAG, self::PR_TO, self::PR_CC])) {
|
!in_array($item['post-reason'], [self::PR_FOLLOWER, self::PR_TAG, self::PR_TO, self::PR_CC])) {
|
||||||
Logger::info('Contact is not a follower, thread will not be stored', ['author' => $item['author-link'], 'uid' => $uid, 'uri-id' => $uri_id]);
|
Logger::info('Contact is not a follower, thread will not be stored', ['author' => $item['author-link'], 'uid' => $uid, 'uri-id' => $uri_id, 'post-reason' => $item['post-reason']]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user