X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fqueued_xmpp.php;h=f6bccfd5ba40ddbac9cc0edcb80b478dbdf34dc6;hb=f2b60b78b6096447a8aadc3d5075bb916f89880a;hp=4b890c4ca4502974716db5824147e39d42ebc605;hpb=c7507e7e9dafa6d6e054978e720e4fce3abc9929;p=quix0rs-gnu-social.git diff --git a/lib/queued_xmpp.php b/lib/queued_xmpp.php index 4b890c4ca4..f6bccfd5ba 100644 --- a/lib/queued_xmpp.php +++ b/lib/queued_xmpp.php @@ -49,10 +49,20 @@ class Queued_XMPP extends XMPPHP_XMPP */ public function __construct($host, $port, $user, $password, $resource, $server = null, $printlog = false, $loglevel = null) { - parent::__construct($host, $port, $user, $password, $resource, $server, $printlog, $loglevel); - // Normally the fulljid isn't filled out until resource binding time; - // we need to save it here since we're not talking to a real server. - $this->fulljid = "{$this->basejid}/{$this->resource}"; + parent::__construct($host, $port, $user, $password, $resource, $server, $printlog, $loglevel); + + // We use $host to connect, but $server to build JIDs if specified. + // This seems to fix an upstream bug where $host was used to build + // $this->basejid, never seen since it isn't actually used in the base + // classes. + if (!$server) { + $server = $this->host; + } + $this->basejid = $this->user . '@' . $server; + + // Normally the fulljid is filled out by the server at resource binding + // time, but we need to do it since we're not talking to a real server. + $this->fulljid = "{$this->basejid}/{$this->resource}"; } /** @@ -63,7 +73,7 @@ class Queued_XMPP extends XMPPHP_XMPP */ public function send($msg, $timeout=NULL) { - $qm = QueueManager::get(); + $qm = QueueManager::get('xmppout'); $qm->enqueue(strval($msg), 'xmppout'); }