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

login id correction

parent 36c435bf
......@@ -89,12 +89,15 @@
}
})
.declareMethod('setUserJID', function (jid) {
this.userJID = Strophe.getBareJidFromJid(jid);
.declareMethod('getConnectionJID', function () {
return this.getDeclaredGadget('connection')
.push(function (connection_gadget) {
return connection_gadget.getConnectionJID();
});
})
.declareMethod('getUserJID', function () {
return this.userJID;
.allowPublicAcquisition('getConnectionJID', function () {
return this.getConnectionJid();
})
.allowPublicAcquisition('getJID', function () {
......@@ -102,11 +105,15 @@
})
.allowPublicAcquisition('openChat', function (jid) {
return this.aq_pleasePublishMyState({
page: "chatbox",
current_contact_jid: jid[0],
jid: "thibaut.frain@tiolive.com"
})
var gadget = this;
return gadget.getConnectionJID()
.push(function (connection_jid) {
return gadget.aq_pleasePublishMyState({
page: 'chatbox',
current_contact_jid: jid[0],
jid: connection_jid
});
})
.push(this.pleaseRedirectMyHash.bind(this));
})
......
......@@ -95,7 +95,7 @@
.declareAcquiredMethod('receive', 'receive')
.declareMethod('getJID', function () {
.declareMethod('getConnectionJID', function () {
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