upd: vue.container.emergency (fix message send)

This commit is contained in:
xdrm-brackets 2017-12-07 20:02:27 +01:00
parent cf08a98b9e
commit 629df98a36
1 changed files with 11 additions and 3 deletions

View File

@ -46,11 +46,19 @@ export default {
},
new_message(msg){
// {1} Send message //
this.gstore.func.sendMessage(this.gstore.new_msg.emergency, wsc_emergency);
/* (1) If empty message -> abort */
if( msg.trim().length == 0 )
return;
// {2} Empty input //
/* (2) Send message to WebSocket */
ws_emergency.send(JSON.stringify({message: msg, location: [1.1, 2.2]}));
/* (3) Add loader */
gstore.data.msg_pending.inbox = true;
/* (4) Empty input */
this.gstore.new_msg.emergency = '';
},
bbcode: function(msg){