summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsarven <csarven@plantard.controlezvous.ca>2009-01-23 02:50:27 +0000
committersarven <csarven@plantard.controlezvous.ca>2009-01-23 02:50:27 +0000
commit86e7e09b66149890650df36eefe6a8e457fa7589 (patch)
tree1235a4b5e0d3eca8ab95edf248072697a5beb315
parent658eebd977fa84b7817144c706ab25d1479b05ba (diff)
parenteb156741f83cb2beab1d02007ad4a3b440a5189a (diff)
Merge branch 'master' of ../trunk
-rw-r--r--lib/jabber.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index 099ded9eb..c33722ea5 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -395,6 +395,27 @@ function jabber_broadcast_notice($notice)
}
}
+ // Now, get users who have it in their inbox because of groups
+
+ $user = new User();
+ $user->query('SELECT user.id, user.jabber ' .
+ 'FROM user JOIN notice_inbox ' .
+ 'ON user.id = notice_inbox.user_id ' .
+ 'WHERE notice_inbox.notice_id = ' . $notice->id . ' ' .
+ 'AND notice_inbox.source = 2 ');
+
+ while ($user->fetch()) {
+ if (!array_key_exists($user->id, $sent_to)) {
+ common_log(LOG_INFO,
+ 'Sending notice ' . $notice->id . ' to ' . $user->jabber,
+ __FILE__);
+ $conn->message($user->jabber, $msg, 'chat', null, $entry);
+ // To keep the incoming queue from filling up,
+ // we service it after each send.
+ $conn->processTime(0);
+ }
+ }
+
$user->free();
return true;