]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/xmppmanager.php
In single-user mode, link #hashtags to the user's tagged stream rather than the globa...
[quix0rs-gnu-social.git] / lib / xmppmanager.php
index 985e7c32e45c4a5c4aba8c247126ecdd191ccece..cca54db08da4b4a016354ffa1b685564c9900fe8 100644 (file)
@@ -36,6 +36,7 @@ class XmppManager extends IoManager
     protected $site = null;
     protected $pingid = 0;
     protected $lastping = null;
+    protected $conn = null;
 
     static protected $singletons = array();
     
@@ -48,7 +49,7 @@ class XmppManager extends IoManager
     public static function get()
     {
         if (common_config('xmpp', 'enabled')) {
-            $site = common_config('site', 'server');
+            $site = StatusNet::currentSite();
             if (empty(self::$singletons[$site])) {
                 self::$singletons[$site] = new XmppManager();
             }
@@ -69,7 +70,7 @@ class XmppManager extends IoManager
 
     function __construct()
     {
-        $this->site = common_config('site', 'server');
+        $this->site = StatusNet::currentSite();
         $this->resource = common_config('xmpp', 'resource') . 'daemon';
     }
 
@@ -476,10 +477,10 @@ class XmppManager extends IoManager
      */
     protected function switchSite()
     {
-        if ($this->site != common_config('site', 'server')) {
+        if ($this->site != StatusNet::currentSite()) {
             common_log(LOG_DEBUG, __METHOD__ . ": switching to site $this->site");
             $this->stats('switch');
-            StatusNet::init($this->site);
+            StatusNet::switchSite($this->site);
         }
     }
 }