lib/client: always populate prefix for incoming messages
This commit is contained in:
parent
52ca3bb91c
commit
0705f4b182
1 changed files with 8 additions and 0 deletions
|
@ -158,6 +158,14 @@ export default class Client extends EventTarget {
|
||||||
if (!msg.prefix) {
|
if (!msg.prefix) {
|
||||||
msg.prefix = this.serverPrefix;
|
msg.prefix = this.serverPrefix;
|
||||||
}
|
}
|
||||||
|
// Some servers send e.g. NOTICE messages before RPL_WELCOME
|
||||||
|
if (!msg.prefix) {
|
||||||
|
msg.prefix = {
|
||||||
|
name: null,
|
||||||
|
user: null,
|
||||||
|
host: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var msgBatch = null;
|
var msgBatch = null;
|
||||||
if (msg.tags["batch"]) {
|
if (msg.tags["batch"]) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue