From 236bf0b0f53ee80d45bcfaff13fd066a84bb9c74 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 14 Oct 2015 00:10:01 +0200 Subject: [PATCH] Remote notice creators should not have notice is_local default to LOCAL_PUBLIC --- classes/Notice.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 6d9ab31ac7..47ada7f958 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -754,7 +754,7 @@ class Notice extends Managed_DataObject $defaults = array( 'groups' => array(), - 'is_local' => self::LOCAL_PUBLIC, + 'is_local' => $actor->isLocal() ? self::LOCAL_PUBLIC : self::REMOTE, 'mentions' => array(), 'reply_to' => null, 'repeat_of' => null, @@ -788,7 +788,8 @@ class Notice extends Managed_DataObject // Sandboxed are non-false, but not 1, either if (!$actor->hasRight(Right::PUBLICNOTICE) || - ($source && $autosource && in_array($source, $autosource))) { + ($source && $autosource && in_array($source, $autosource))) { + // FIXME: ...what about remote nonpublic? Hmmm. That is, if we sandbox remote profiles... $stored->is_local = Notice::LOCAL_NONPUBLIC; } else { $stored->is_local = $is_local; -- 2.39.5