fix impersonation

main
june moretz 2023-05-12 20:44:07 -04:00
parent 1c408aa1ba
commit 1efecfa047
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,
}); });