mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
Ensure msg.prefix is always populated
This commit is contained in:
parent
e9d90d4927
commit
24fe62f1de
1 changed files with 6 additions and 0 deletions
|
@ -145,6 +145,12 @@ export default class Client extends EventTarget {
|
|||
var msg = irc.parseMessage(event.data);
|
||||
console.debug("Received:", msg);
|
||||
|
||||
// If the prefix is missing, assume it's coming from the server on the
|
||||
// other end of the connection
|
||||
if (!msg.prefix) {
|
||||
msg.prefix = this.serverPrefix;
|
||||
}
|
||||
|
||||
var msgBatch = null;
|
||||
if (msg.tags["batch"]) {
|
||||
msgBatch = this.batches.get(msg.tags["batch"]);
|
||||
|
|
Loading…
Reference in a new issue