Fixes NPE when creating non anonymous room
This commit is contained in:
parent
6c4a5bd2bc
commit
394738394d
|
@ -32,7 +32,7 @@
|
||||||
<script src="libs/modules/RTC.bundle.js?v=6"></script>
|
<script src="libs/modules/RTC.bundle.js?v=6"></script>
|
||||||
<script src="libs/modules/desktopsharing.bundle.js?v=3"></script><!-- desktop sharing -->
|
<script src="libs/modules/desktopsharing.bundle.js?v=3"></script><!-- desktop sharing -->
|
||||||
<script src="util.js?v=7"></script><!-- utility functions -->
|
<script src="util.js?v=7"></script><!-- utility functions -->
|
||||||
<script src="libs/modules/xmpp.bundle.js?v=2"></script>
|
<script src="libs/modules/xmpp.bundle.js?v=3"></script>
|
||||||
<script src="app.js?v=28"></script><!-- application logic -->
|
<script src="app.js?v=28"></script><!-- application logic -->
|
||||||
<script src="libs/modules/API.bundle.js?v=1"></script>
|
<script src="libs/modules/API.bundle.js?v=1"></script>
|
||||||
|
|
||||||
|
|
|
@ -3274,6 +3274,8 @@ module.exports = function(XMPP, eventEmitter) {
|
||||||
.c('query', {xmlns: 'http://jabber.org/protocol/muc#owner'})
|
.c('query', {xmlns: 'http://jabber.org/protocol/muc#owner'})
|
||||||
.c('x', {xmlns: 'jabber:x:data', type: 'submit'});
|
.c('x', {xmlns: 'jabber:x:data', type: 'submit'});
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.connection.sendIQ(getForm, function (form) {
|
this.connection.sendIQ(getForm, function (form) {
|
||||||
|
|
||||||
if (!$(form).find(
|
if (!$(form).find(
|
||||||
|
@ -3296,7 +3298,7 @@ module.exports = function(XMPP, eventEmitter) {
|
||||||
formSubmit.c('field', {'var': 'muc#roomconfig_whois'})
|
formSubmit.c('field', {'var': 'muc#roomconfig_whois'})
|
||||||
.c('value').t('anyone').up().up();
|
.c('value').t('anyone').up().up();
|
||||||
|
|
||||||
this.connection.sendIQ(formSubmit);
|
self.connection.sendIQ(formSubmit);
|
||||||
|
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
console.error("Error getting room configuration form");
|
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
|
// 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();
|
formsubmit.c('field', {'var': 'muc#roomconfig_whois'}).c('value').t('anyone').up().up();
|
||||||
// FIXME: is muc#roomconfig_passwordprotectedroom required?
|
// FIXME: is muc#roomconfig_passwordprotectedroom required?
|
||||||
this.connection.sendIQ(formsubmit,
|
ob.connection.sendIQ(formsubmit,
|
||||||
onSuccess,
|
onSuccess,
|
||||||
onError);
|
onError);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -61,6 +61,8 @@ module.exports = function(XMPP, eventEmitter) {
|
||||||
.c('query', {xmlns: 'http://jabber.org/protocol/muc#owner'})
|
.c('query', {xmlns: 'http://jabber.org/protocol/muc#owner'})
|
||||||
.c('x', {xmlns: 'jabber:x:data', type: 'submit'});
|
.c('x', {xmlns: 'jabber:x:data', type: 'submit'});
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.connection.sendIQ(getForm, function (form) {
|
this.connection.sendIQ(getForm, function (form) {
|
||||||
|
|
||||||
if (!$(form).find(
|
if (!$(form).find(
|
||||||
|
@ -83,7 +85,7 @@ module.exports = function(XMPP, eventEmitter) {
|
||||||
formSubmit.c('field', {'var': 'muc#roomconfig_whois'})
|
formSubmit.c('field', {'var': 'muc#roomconfig_whois'})
|
||||||
.c('value').t('anyone').up().up();
|
.c('value').t('anyone').up().up();
|
||||||
|
|
||||||
this.connection.sendIQ(formSubmit);
|
self.connection.sendIQ(formSubmit);
|
||||||
|
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
console.error("Error getting room configuration form");
|
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
|
// 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();
|
formsubmit.c('field', {'var': 'muc#roomconfig_whois'}).c('value').t('anyone').up().up();
|
||||||
// FIXME: is muc#roomconfig_passwordprotectedroom required?
|
// FIXME: is muc#roomconfig_passwordprotectedroom required?
|
||||||
this.connection.sendIQ(formsubmit,
|
ob.connection.sendIQ(formsubmit,
|
||||||
onSuccess,
|
onSuccess,
|
||||||
onError);
|
onError);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue