]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jabber.php
Merge commit 'mainline-write/0.8.x' into 0.8.x
[quix0rs-gnu-social.git] / lib / jabber.php
index 9108d1c4782ad46793fe1aff1b6dbdc3cff054cc..e15076160fc82c1bccb128e5709ded5db65af777 100644 (file)
@@ -77,6 +77,14 @@ function jabber_daemon_address()
     return common_config('xmpp', 'user') . '@' . common_config('xmpp', 'server');
 }
 
+class Sharing_XMPP extends XMPPHP_XMPP
+{
+    function getSocket()
+    {
+        return $this->socket;
+    }
+}
+
 /**
  * connect the configured Jabber account to the configured server
  *
@@ -89,7 +97,7 @@ function jabber_connect($resource=null)
 {
     static $conn = null;
     if (!$conn) {
-        $conn = new XMPPHP_XMPP(common_config('xmpp', 'host') ?
+        $conn = new Sharing_XMPP(common_config('xmpp', 'host') ?
                                 common_config('xmpp', 'host') :
                                 common_config('xmpp', 'server'),
                                 common_config('xmpp', 'port'),
@@ -179,7 +187,7 @@ function jabber_format_entry($profile, $notice)
     $xs->elementEnd('body');
     $xs->elementEnd('html');
 
-    $html = $xs->asString();
+    $html = $xs->getString();
 
     return $html . ' ' . $entry;
 }