]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/publicnoticestream.php
Avoid having to check for notices without rendered copies in upgrade.php
[quix0rs-gnu-social.git] / lib / publicnoticestream.php
index 222eead0efb1c940db610388f5392c0684763d45..757c2164c08fc69af8e00bb9a24418d4b13899ec 100644 (file)
@@ -81,21 +81,14 @@ class RawPublicNoticeStream extends NoticeStream
             $notice->limit($offset, $limit);
         }
 
-        if (common_config('public', 'localonly')) {
-            $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC);
-        } else {
-            // -1 == blacklisted, -2 == gateway (i.e. Twitter)
-            $notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC);
-            $notice->whereAdd('is_local !='. Notice::GATEWAY);
-        }
+        // This feed always gives only local activities.
+        $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC);
 
         Notice::addWhereSinceId($notice, $since_id);
         Notice::addWhereMaxId($notice, $max_id);
 
-        if (!$this->allVerbs) {
-            $notice->whereAdd(sprintf('verb="%s" OR verb="%s"',
-                                      ActivityVerb::POST,
-                                      ActivityUtils::resolveUri(ActivityVerb::POST, true)));
+        if (!empty($this->selectVerbs)) {
+            $notice->whereAddIn('verb', $this->selectVerbs, $notice->columnType('verb'));
         }
 
         $ids = array();