Allow HTML elements in addToChatbox.

This commit is contained in:
Juliusz Chroboczek
2023-12-08 22:43:18 +01:00
parent 96e2db0347
commit 0fc9136774
3 changed files with 34 additions and 34 deletions
+3 -2
View File
@@ -193,7 +193,7 @@ function ServerConnection() {
/**
* onchat is called whenever a new chat message is received.
*
* @type {(this: ServerConnection, id: string, dest: string, username: string, time: Date, privileged: boolean, history: boolean, kind: string, message: unknown) => void}
* @type {(this: ServerConnection, id: string, dest: string, username: string, time: Date, privileged: boolean, history: boolean, kind: string, message: string) => void}
*/
this.onchat = null;
/**
@@ -437,7 +437,8 @@ ServerConnection.prototype.connect = async function(url) {
if(sc.onchat)
sc.onchat.call(
sc, m.source, m.dest, m.username, parseTime(m.time),
m.privileged, m.type === 'chathistory', m.kind, m.value,
m.privileged, m.type === 'chathistory', m.kind,
'' + m.value,
);
break;
case 'usermessage':