Add id to chat messages.

This commit is contained in:
Juliusz Chroboczek
2024-08-11 19:00:17 +02:00
parent 4fb0b3334a
commit eb72069c9b
5 changed files with 34 additions and 22 deletions
+2 -2
View File
@@ -212,7 +212,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: string) => void}
* @type {(this: ServerConnection, id: string, source: string, dest: string, username: string, time: Date, privileged: boolean, history: boolean, kind: string, message: string) => void}
*/
this.onchat = null;
/**
@@ -497,7 +497,7 @@ ServerConnection.prototype.connect = function(url) {
case 'chathistory':
if(sc.onchat)
sc.onchat.call(
sc, m.source, m.dest, m.username, parseTime(m.time),
sc, m.id, m.source, m.dest, m.username, parseTime(m.time),
m.privileged, m.type === 'chathistory', m.kind,
'' + m.value,
);