X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fqueued_xmpp.php;h=f6bccfd5ba40ddbac9cc0edcb80b478dbdf34dc6;hb=dc424ab63a91bf4c29198452d54543b8737b65ac;hp=fdd074db2996e422e934d1efa473d1df514b1526;hpb=d5cbfe8071d56438cfa168dc3db56a959317eae0;p=quix0rs-gnu-social.git diff --git a/lib/queued_xmpp.php b/lib/queued_xmpp.php index fdd074db29..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}"; } /**