Fix TypeError in isHighlight

TypeError: msg.prefix is null
This commit is contained in:
Simon Ser 2021-05-28 09:37:39 +02:00
parent 6491f7e915
commit e9d90d4927

View file

@ -245,7 +245,8 @@ export function isHighlight(msg, nick) {
if (msg.command != "PRIVMSG" && msg.command != "NOTICE") {
return false;
}
if (msg.prefix.name == nick) {
// TODO: case-mapping handling
if (msg.prefix && msg.prefix.name == nick) {
return false; // Our own messages aren't highlights
}