From 7dfc895d05af90e3a310e36e2729ed4fdede5ea0 Mon Sep 17 00:00:00 2001 From: Wasser Date: Mon, 12 Mar 2012 10:14:23 +0100 Subject: [PATCH] Get JID and Service when Attached --- pubsub/strophe.pubsub.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubsub/strophe.pubsub.js b/pubsub/strophe.pubsub.js index f03f1ab..8b767ad 100644 --- a/pubsub/strophe.pubsub.js +++ b/pubsub/strophe.pubsub.js @@ -149,7 +149,8 @@ Extend connection object to have plugin name 'pubsub'. // Called by Strophe on connection event statusChanged: function (status, condition) { var that = this._connection; - if (this._autoService && status === Strophe.Status.CONNECTED) { + if (this._autoService && + (status === Strophe.Status.CONNECTED || status === Strophe.Status.ATTACHED)) { this.service = 'pubsub.'+Strophe.getDomainFromJid(that.jid); this.jid = that.jid; }