summaryrefslogtreecommitdiff
path: root/classes/Notice_inbox.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-18 11:45:48 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-18 11:45:48 -0700
commit3f54840b51d5565fdeb7057661ff730bc0e41833 (patch)
tree7bb2ab81f6523ccfb46eb4e5f3cd4d9ba7d56389 /classes/Notice_inbox.php
parentb761cfd4094c778b533cf77570b655d25cfced6b (diff)
Only show twitter msgs in your own inbox
Diffstat (limited to 'classes/Notice_inbox.php')
-rw-r--r--classes/Notice_inbox.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/classes/Notice_inbox.php b/classes/Notice_inbox.php
index 367a35f1f..4ca2e9ae3 100644
--- a/classes/Notice_inbox.php
+++ b/classes/Notice_inbox.php
@@ -47,20 +47,25 @@ class Notice_inbox extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
- function stream($user_id, $offset, $limit, $since_id, $max_id, $since)
+ function stream($user_id, $offset, $limit, $since_id, $max_id, $since, $own=false)
{
return Notice::stream(array('Notice_inbox', '_streamDirect'),
- array($user_id),
- 'notice_inbox:by_user:'.$user_id,
+ array($user_id, $own),
+ ($own) ? 'notice_inbox:by_user:'.$user_id :
+ 'notice_inbox:by_user_own:'.$user_id,
$offset, $limit, $since_id, $max_id, $since);
}
- function _streamDirect($user_id, $offset, $limit, $since_id, $max_id, $since)
+ function _streamDirect($user_id, $own, $offset, $limit, $since_id, $max_id, $since)
{
$inbox = new Notice_inbox();
$inbox->user_id = $user_id;
+ if (!$own) {
+ $inbox->whereAdd('source != ' . NOTICE_INBOX_SOURCE_GATEWAY);
+ }
+
if ($since_id != 0) {
$inbox->whereAdd('notice_id > ' . $since_id);
}