diff --git a/index.html b/index.html index de00b219e..d4abc8f58 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ - + diff --git a/libs/modules/xmpp.bundle.js b/libs/modules/xmpp.bundle.js index 0ee935d3b..e544fd9d2 100644 --- a/libs/modules/xmpp.bundle.js +++ b/libs/modules/xmpp.bundle.js @@ -3274,6 +3274,8 @@ module.exports = function(XMPP, eventEmitter) { .c('query', {xmlns: 'http://jabber.org/protocol/muc#owner'}) .c('x', {xmlns: 'jabber:x:data', type: 'submit'}); + var self = this; + this.connection.sendIQ(getForm, function (form) { if (!$(form).find( @@ -3296,7 +3298,7 @@ module.exports = function(XMPP, eventEmitter) { formSubmit.c('field', {'var': 'muc#roomconfig_whois'}) .c('value').t('anyone').up().up(); - this.connection.sendIQ(formSubmit); + self.connection.sendIQ(formSubmit); }, function (error) { console.error("Error getting room configuration form"); @@ -3560,7 +3562,7 @@ module.exports = function(XMPP, eventEmitter) { // Fixes a bug in prosody 0.9.+ https://code.google.com/p/lxmppd/issues/detail?id=373 formsubmit.c('field', {'var': 'muc#roomconfig_whois'}).c('value').t('anyone').up().up(); // FIXME: is muc#roomconfig_passwordprotectedroom required? - this.connection.sendIQ(formsubmit, + ob.connection.sendIQ(formsubmit, onSuccess, onError); } else { diff --git a/modules/xmpp/strophe.emuc.js b/modules/xmpp/strophe.emuc.js index 989a192f0..e76512896 100644 --- a/modules/xmpp/strophe.emuc.js +++ b/modules/xmpp/strophe.emuc.js @@ -61,6 +61,8 @@ module.exports = function(XMPP, eventEmitter) { .c('query', {xmlns: 'http://jabber.org/protocol/muc#owner'}) .c('x', {xmlns: 'jabber:x:data', type: 'submit'}); + var self = this; + this.connection.sendIQ(getForm, function (form) { if (!$(form).find( @@ -83,7 +85,7 @@ module.exports = function(XMPP, eventEmitter) { formSubmit.c('field', {'var': 'muc#roomconfig_whois'}) .c('value').t('anyone').up().up(); - this.connection.sendIQ(formSubmit); + self.connection.sendIQ(formSubmit); }, function (error) { console.error("Error getting room configuration form"); @@ -347,7 +349,7 @@ module.exports = function(XMPP, eventEmitter) { // Fixes a bug in prosody 0.9.+ https://code.google.com/p/lxmppd/issues/detail?id=373 formsubmit.c('field', {'var': 'muc#roomconfig_whois'}).c('value').t('anyone').up().up(); // FIXME: is muc#roomconfig_passwordprotectedroom required? - this.connection.sendIQ(formsubmit, + ob.connection.sendIQ(formsubmit, onSuccess, onError); } else {