Commit bf3e6f23 authored by worlword's avatar worlword

some code-changes to align with the coding standard

parent 7660dbfb
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
}); });
}, },
createFileMessageStanza(message, to){ createFileMessageStanza (message, to) {
const stanza = $msg({ const stanza = $msg({
'from': _converse.connection.jid, 'from': _converse.connection.jid,
'to': to, 'to': to,
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
'click .toggle-smiley': 'toggleEmojiMenu', 'click .toggle-smiley': 'toggleEmojiMenu',
'click .toggle-spoiler': 'toggleSpoilerMessage', 'click .toggle-spoiler': 'toggleSpoilerMessage',
'click .toggle-compose-spoiler': 'toggleComposeSpoilerMessage', 'click .toggle-compose-spoiler': 'toggleComposeSpoilerMessage',
'keypress .chat-textarea': 'keyPressed', 'keypress .chat-textarea': 'keyPressed'
}, },
initialize () { initialize () {
...@@ -829,7 +829,7 @@ ...@@ -829,7 +829,7 @@
// TODO: We might want to send to specfic resources. // TODO: We might want to send to specfic resources.
// Especially in the OTR case. // Especially in the OTR case.
var messageStanza; var messageStanza;
if(file !== null){ if (file !== null) {
messageStanza = this.createFileMessageStanza(message, this.model.get('jid')); messageStanza = this.createFileMessageStanza(message, this.model.get('jid'));
} }
else { else {
...@@ -845,7 +845,7 @@ ...@@ -845,7 +845,7 @@
'xmns': Strophe.NS.DELAY, 'xmns': Strophe.NS.DELAY,
'stamp': moment().format() 'stamp': moment().format()
}).up() }).up()
.cnode(message.tree()) .cnode(messageStanza.tree())
); );
} }
}, },
...@@ -890,7 +890,6 @@ ...@@ -890,7 +890,6 @@
} }
const attrs = this.getOutgoingMessageAttributes(text, spoiler_hint); const attrs = this.getOutgoingMessageAttributes(text, spoiler_hint);
const message = this.model.messages.create(attrs); const message = this.model.messages.create(attrs);
this.sendMessage(message, file); this.sendMessage(message, file);
}, },
......
...@@ -835,7 +835,7 @@ ...@@ -835,7 +835,7 @@
* Parameters: * Parameters:
* (String) text - The message text. * (String) text - The message text.
*/ */
if(file !== null){ if (file !== null) {
return this.model.sendChatRoomFile(text,this.model.get('jid')); return this.model.sendChatRoomFile(text,this.model.get('jid'));
} }
if (_converse.muc_disable_moderator_commands) { if (_converse.muc_disable_moderator_commands) {
......
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