Commit 98eee053 authored by Thibaut Frain's avatar Thibaut Frain

login id correction

parent 36c435bf
...@@ -89,12 +89,15 @@ ...@@ -89,12 +89,15 @@
} }
}) })
.declareMethod('setUserJID', function (jid) { .declareMethod('getConnectionJID', function () {
this.userJID = Strophe.getBareJidFromJid(jid); return this.getDeclaredGadget('connection')
.push(function (connection_gadget) {
return connection_gadget.getConnectionJID();
});
}) })
.declareMethod('getUserJID', function () { .allowPublicAcquisition('getConnectionJID', function () {
return this.userJID; return this.getConnectionJid();
}) })
.allowPublicAcquisition('getJID', function () { .allowPublicAcquisition('getJID', function () {
...@@ -102,11 +105,15 @@ ...@@ -102,11 +105,15 @@
}) })
.allowPublicAcquisition('openChat', function (jid) { .allowPublicAcquisition('openChat', function (jid) {
return this.aq_pleasePublishMyState({ var gadget = this;
page: "chatbox", return gadget.getConnectionJID()
current_contact_jid: jid[0], .push(function (connection_jid) {
jid: "thibaut.frain@tiolive.com" return gadget.aq_pleasePublishMyState({
}) page: 'chatbox',
current_contact_jid: jid[0],
jid: connection_jid
});
})
.push(this.pleaseRedirectMyHash.bind(this)); .push(this.pleaseRedirectMyHash.bind(this));
}) })
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
.declareAcquiredMethod('receive', 'receive') .declareAcquiredMethod('receive', 'receive')
.declareMethod('getJID', function () { .declareMethod('getConnectionJID', function () {
return Strophe.getBareJidFromJid(this.props.connection.jid); return Strophe.getBareJidFromJid(this.props.connection.jid);
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment