diff --git a/lib/XmppPrebind.php b/lib/XmppPrebind.php index 5974d3a..5d33484 100644 --- a/lib/XmppPrebind.php +++ b/lib/XmppPrebind.php @@ -116,7 +116,9 @@ public function __construct($jabberHost, $boshUri, $resource, $useSsl = false, $ * @param string $password Password */ public function connect($username, $password) { - $this->jid = $username . '@' . $this->jabberHost . '/' . $this->resource; + $this->jid = $username . '@' . $this->jabberHost; + if($this->resource != null) + $this->jid .= '/' . $this->resource; $this->password = $password; $response = $this->sendInitialConnection();