Commit a0e2bcce authored by Adrien Dorsaz's avatar Adrien Dorsaz

js-beautify

parent 981075ae
......@@ -68,16 +68,21 @@ function checkConnection() {
function refreshNetwork(response) {
if (!response.error) {
let xmppNet = document.getElementById('xmppNet');
let pubsubNet = {'pubsub': new Array()}
let pubsubNet = {
'pubsub': new Array()
}
response.network.pubsub.forEach( (entity, jid) => {
response.network.pubsub.forEach((entity, jid) => {
let features = new Array();
entity['metadata']['features'].forEach( (feature) => {
features.push({'feature': feature});
entity['metadata']['features'].forEach((feature) => {
features.push({
'feature': feature
});
});
pubsubNet['pubsub'].push({'name': entity['metadata']['name'] || jid,
pubsubNet['pubsub'].push({
'name': entity['metadata']['name'] || jid,
'jid': jid,
'features': features
});
......
......@@ -16,7 +16,7 @@ class Message extends Stanza {
// but it could be not defined to send message. to bare JID of the client
if (this.to) {
message.setAttribute('to', this.to);
}
}
message.setAttribute('from', this.from);
......
......@@ -16,7 +16,7 @@ class Presence extends Stanza {
// However client MAY set "to" to route the presence to a recipient
if (this.to) {
presence.setAttribute('to', this.to);
}
}
presence.setAttribute('from', this.from);
......
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