diff --git a/src/core/utils.js b/src/core/utils.js index 7101e5a..eccc9df 100644 --- a/src/core/utils.js +++ b/src/core/utils.js @@ -47,7 +47,7 @@ export function clamp(n, min, max) { */ export function dateToString(date) { // YYYY-MM-DD - return ate.substring(0, 4) + date.substring(5, 7) + date.substring(8) + return date.substring(0, 4) + date.substring(5, 7) + date.substring(8); } /* diff --git a/src/socket/APISocketServer.js b/src/socket/APISocketServer.js index a051321..a257707 100644 --- a/src/socket/APISocketServer.js +++ b/src/socket/APISocketServer.js @@ -106,7 +106,14 @@ class APISocketServer { return; } - const sendmsg = JSON.stringify(['msg', name, id, msg, country, channelId]); + const sendmsg = JSON.stringify([ + 'msg', + name, + parseInt(id, 10), + msg, + country, + parseInt(channelId, 10), + ]); this.wss.clients.forEach((client) => { if (client !== ws && client.subChat