Add id to chat messages.
This commit is contained in:
+2
-2
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user