Added block invites

This commit is contained in:
NigeParis 2025-12-29 12:15:19 +01:00 committed by Maix0
parent 69c00f909f
commit da8298dce8
6 changed files with 66 additions and 11 deletions

View file

@ -340,6 +340,25 @@ function handleChat(_url: string, _args: RouteHandlerParams): RouteHandlerReturn
}
if (chatWindow && data.message.destination === "inviteMsg") {
const messageElement = document.createElement("div-private");
const chatWindow = document.getElementById("t-chatbox") as HTMLDivElement;
messageElement.innerHTML = `🎃${data.message.SenderUserName}: ${data.message.innerHtml}`;
chatWindow.appendChild(messageElement);
chatWindow.scrollTop = chatWindow.scrollHeight;
}
const MAX_SYSTEM_MESSAGES = 10;
if (systemWindow && data.message.destination === "system-info") {

View file

@ -13,6 +13,7 @@ export type ClientMessage = {
SenderUserID: string,
timestamp: number,
Sendertext: string,
innerHtml?: string,
};