Commit ad9a840c authored by JC Brand's avatar JC Brand

Avoid saving full MUC JID as domain

parent 4129c0ea
...@@ -68202,14 +68202,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -68202,14 +68202,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
showRooms(ev) { showRooms(ev) {
ev.preventDefault(); ev.preventDefault();
const data = new FormData(ev.target); const data = new FormData(ev.target);
this.model.save('muc_domain', data.get('server')); this.model.save('muc_domain', Strophe.getDomainFromJid(data.get('server')));
this.updateRoomsList(); this.updateRoomsList();
}, },
setDomain(ev) { setDomain(ev) {
this.model.save({ this.model.save('muc_domain', Strophe.getDomainFromJid(ev.target.value));
'muc_domain': ev.target.value
});
}, },
setNick(ev) { setNick(ev) {
...@@ -69805,9 +69803,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -69805,9 +69803,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
function setMUCDomain(domain, controlboxview) { function setMUCDomain(domain, controlboxview) {
_converse.muc_domain = domain; _converse.muc_domain = domain;
controlboxview.roomspanel.model.save({ controlboxview.roomspanel.model.save('muc_domain', Strophe.getDomainFromJid(domain));
'muc_domain': domain
});
} }
function setMUCDomainFromDisco(controlboxview) { function setMUCDomainFromDisco(controlboxview) {
...@@ -412,12 +412,12 @@ ...@@ -412,12 +412,12 @@
showRooms (ev) { showRooms (ev) {
ev.preventDefault(); ev.preventDefault();
const data = new FormData(ev.target); const data = new FormData(ev.target);
this.model.save('muc_domain', data.get('server')); this.model.save('muc_domain', Strophe.getDomainFromJid(data.get('server')));
this.updateRoomsList(); this.updateRoomsList();
}, },
setDomain (ev) { setDomain (ev) {
this.model.save({'muc_domain': ev.target.value}); this.model.save('muc_domain', Strophe.getDomainFromJid(ev.target.value));
}, },
setNick (ev) { setNick (ev) {
...@@ -1929,7 +1929,7 @@ ...@@ -1929,7 +1929,7 @@
function setMUCDomain (domain, controlboxview) { function setMUCDomain (domain, controlboxview) {
_converse.muc_domain = domain; _converse.muc_domain = domain;
controlboxview.roomspanel.model.save({'muc_domain': domain}); controlboxview.roomspanel.model.save('muc_domain', Strophe.getDomainFromJid(domain));
} }
function setMUCDomainFromDisco (controlboxview) { function setMUCDomainFromDisco (controlboxview) {
......
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