diff options
author | Brion Vibber <brion@pobox.com> | 2010-06-03 16:58:45 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-06-03 16:58:45 -0700 |
commit | 5f4c6ec626d3d641f0712b276deb32b218b7a330 (patch) | |
tree | 8d27dacccdcb671822ee2b7c6f262c3bed3feddc /classes/Notice.php | |
parent | 791b98046d2c81aecfa468c06d4b7fd1f06ea8fa (diff) |
Skip enqueueing to outgoing bridges on incoming remote messages. Twitter, Facebook, RSSCloud, and OStatus checks were enqueued on these when they'd never do anything but churn the queue servers.
Notice::isLocal() can replace a number of manual checks for $notice->is_local being LOCAL_PUBLIC or LOCAL_NONPUBLIC.
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 3d7d21533..cda632885 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1861,4 +1861,16 @@ class Notice extends Memcached_DataObject return $ns; } + /** + * Determine whether the notice was locally created + * + * @return boolean locality + */ + + public function isLocal() + { + return ($this->is_local == Notice::LOCAL_PUBLIC || + $this->is_local == Notice::LOCAL_NONPUBLIC); + } + } |