summaryrefslogtreecommitdiff
path: root/lib/jabber.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-12-09 21:47:06 -0500
committerEvan Prodromou <evan@controlyourself.ca>2008-12-09 21:47:06 -0500
commit4b93bc99244fd7b7d56534d6877ec36e72409683 (patch)
treee5cc3b9b7d18ea4f2ef94aa2260033c5933c2baa /lib/jabber.php
parent3210cd69cc295e2af9dce5daac4953822e4f9fc7 (diff)
on broadcast jabber and sms to people with the flags set
darcs-hash:20081210024706-5ed1f-fd54b76630656f7d4f7617309d2e4f87f25b006b.gz
Diffstat (limited to 'lib/jabber.php')
-rw-r--r--lib/jabber.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index 3d388bd01..ab0fd6af8 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -207,7 +207,7 @@ function jabber_broadcast_notice($notice) {
$profile->free();
unset($profile);
-
+
$sent_to = array();
$conn = jabber_connect();
@@ -230,7 +230,7 @@ function jabber_broadcast_notice($notice) {
}
$user->free();
-
+
# Now, get users subscribed to this profile
$user = new User();
@@ -238,7 +238,8 @@ function jabber_broadcast_notice($notice) {
'FROM user JOIN subscription ON user.id = subscription.subscriber ' .
'WHERE subscription.subscribed = ' . $notice->profile_id . ' ' .
'AND user.jabber is not null ' .
- 'AND user.jabbernotify = 1 ');
+ 'AND user.jabbernotify = 1 ' .
+ 'AND subscription.jabber = 1 ');
while ($user->fetch()) {
if (!array_key_exists($user->id, $sent_to)) {
@@ -252,7 +253,7 @@ function jabber_broadcast_notice($notice) {
}
$user->free();
-
+
return true;
}