+ $autosource = common_config('public', 'autosource');
+
+ // Sandboxed are non-false, but not 1, either
+ if (!$actor->hasRight(Right::PUBLICNOTICE) ||
+ ($source && $autosource && in_array($source, $autosource))) {
+ $stored->is_local = Notice::LOCAL_NONPUBLIC;
+ } else {
+ $stored->is_local = $is_local;
+ }
+
+ if (!$stored->isLocal()) {
+ // Only do these checks for non-local notices. Local notices will generate these values later.
+ if (!common_valid_http_url($url)) {
+ common_debug('Bad notice URL: ['.$url.'], URI: ['.$uri.']. Cannot link back to original! This is normal for shared notices etc.');
+ }
+ if (empty($uri)) {
+ throw new ServerException('No URI for remote notice. Cannot accept that.');
+ }
+ }
+