Cleaning things up like always.
This commit is contained in:
@@ -78,6 +78,11 @@ function ws_connect_group_id({group_id, client_id}) {
|
||||
let ws_recv_data = JSON.parse(event.data);
|
||||
console.log(ws_recv_data);
|
||||
|
||||
if (client_id == ws_recv_data.client_id) {
|
||||
console.log('WS: Message received was sent by self and is an echo that can be ignored.');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ws_recv_data.type == 'cmd') {
|
||||
console.log(`WS: Type CMD: ${ws_recv_data.cmd}`);
|
||||
ws_received_list_cmd.unshift(ws_recv_data); // Add to the beginning of the list
|
||||
|
||||
Reference in New Issue
Block a user