jerl 2023-05-12 17:50:05 -07:00
commit 3ae81f1ec7
2 changed files with 1 additions and 2 deletions

View File

@ -40,7 +40,6 @@ async function message(e) {
const msg = document.getElementById("msg").value; const msg = document.getElementById("msg").value;
if (!msg) return; if (!msg) return;
window.socket.emit("send_message", { window.socket.emit("send_message", {
name: window.name,
message: msg, message: msg,
thread: window.currentThreadId, thread: window.currentThreadId,
}); });

View File

@ -15,7 +15,7 @@ const send_message = async (msg, respond, socket) => {
); );
socket.broadcast.emit("new_message", { socket.broadcast.emit("new_message", {
id: id.rows[0].id, id: id.rows[0].id,
name: msg.name, name: msg.auth_user.name,
message: msg.message, message: msg.message,
thread: msg.thread, thread: msg.thread,
}); });