Added block invites
This commit is contained in:
parent
69c00f909f
commit
da8298dce8
6 changed files with 66 additions and 11 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export type ClientMessage = {
|
|||
SenderUserID: string,
|
||||
timestamp: number,
|
||||
Sendertext: string,
|
||||
innerHtml?: string,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue