summaryrefslogtreecommitdiff
path: root/lib/jabber.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlezvous.ca>2008-06-26 11:03:36 -0400
committerEvan Prodromou <evan@controlezvous.ca>2008-06-26 11:03:36 -0400
commitd195c49d96314fc3a597d04fbc7d279c307a9311 (patch)
tree0f747bab4b4c443e50149afda3bf11433709e465 /lib/jabber.php
parent69107377605f64537dd6021c9256500982cafb9c (diff)
use jabber.php more from xmppdaemon
darcs-hash:20080626150336-34904-bfa5ec8740ba1edf60c34e1ef6aafdfd73fc99a2.gz
Diffstat (limited to 'lib/jabber.php')
-rw-r--r--lib/jabber.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index 2e6770651..7e33b8e39 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -37,7 +37,7 @@ function jabber_normalize_jid($jid) {
}
}
-function jabber_connect($resource=NULL, $status=NULL) {
+function jabber_connect($resource=NULL) {
static $conn = NULL;
if (!$conn) {
$conn = new XMPP(common_config('xmpp', 'host') ?
@@ -53,14 +53,11 @@ function jabber_connect($resource=NULL, $status=NULL) {
if (!$conn) {
return false;
}
- $conn->connect(true); # try to get a persistent connection
+ $conn->connect(true); # true = persistent connection
if ($conn->disconnected) {
return false;
}
- $conn->processUntil('session_start');
- if ($status) {
- $conn->presence($status);
- }
+ $conn->processUntil('session_start');
}
return $conn;
}
@@ -74,7 +71,7 @@ function jabber_send_message($to, $body, $type='chat', $subject=NULL) {
return true;
}
-function jabber_send_presence($status=Null, $show='available', $to=Null) {
+function jabber_send_presence($status, $show='available', $to=Null) {
$conn = jabber_connect();
if (!$conn) {
return false;