]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Remote notice creators should not have notice is_local default to LOCAL_PUBLIC
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 13 Oct 2015 22:10:01 +0000 (00:10 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 13 Oct 2015 22:10:01 +0000 (00:10 +0200)
classes/Notice.php

index 6d9ab31ac7f442b34c66981b6b986cb8ecbfa997..47ada7f9580ef7fb513bcbd35d9163147fb38a60 100644 (file)
@@ -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;