Skip to content

Commit

Permalink
Also don't show chat join/leave events from history
Browse files Browse the repository at this point in the history
  • Loading branch information
herronjo committed Nov 16, 2024
1 parent a5e12a1 commit 1b62b0b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tv/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ window.addEventListener("load", function() {
lastUserToSend = msg.user.username;
break;
}
case "join": {
const evt = document.createElement("i");
evt.classList.add("width100", "sysnotif");
evt.setAttribute("title", new Date(msg.time).toLocaleString());
evt.textContent = `${msg.username} joined the chat.`;
$("#chatmessages").append(evt);
break;
}
case "leave": {
const evt = document.createElement("i");
evt.classList.add("width100", "sysnotif");
evt.setAttribute("title", new Date(msg.time).toLocaleString());
evt.textContent = `${msg.username} left the chat.`;
$("#chatmessages").append(evt);
break;
}
// case "join": {
// const evt = document.createElement("i");
// evt.classList.add("width100", "sysnotif");
// evt.setAttribute("title", new Date(msg.time).toLocaleString());
// evt.textContent = `${msg.username} joined the chat.`;
// $("#chatmessages").append(evt);
// break;
// }
// case "leave": {
// const evt = document.createElement("i");
// evt.classList.add("width100", "sysnotif");
// evt.setAttribute("title", new Date(msg.time).toLocaleString());
// evt.textContent = `${msg.username} left the chat.`;
// $("#chatmessages").append(evt);
// break;
// }
}
});
$("#chatmessages").scrollTop = $("#chatmessages").scrollHeight;
Expand Down

0 comments on commit 1b62b0b

Please sign in to comment.