components/app: fix STATUSMSG NOTICE when target buffer is closed

This commit is contained in:
Simon Ser 2024-04-30 11:22:22 +02:00
parent 3d03c0dbcf
commit 0f273b9699

View File

@ -933,6 +933,14 @@ export default class App extends Component {
}
}
let allowedPrefixes = client.isupport.statusMsg();
if (allowedPrefixes) {
let parts = irc.parseTargetPrefix(target, allowedPrefixes);
if (client.isChannel(parts.name)) {
target = parts.name;
}
}
// Don't open a new buffer if this is just a NOTICE or a garbage
// CTCP message
let openNewBuffer = true;
@ -948,13 +956,6 @@ export default class App extends Component {
target = SERVER_BUFFER;
}
let allowedPrefixes = client.isupport.statusMsg();
if (allowedPrefixes) {
let parts = irc.parseTargetPrefix(target, allowedPrefixes);
if (client.isChannel(parts.name)) {
target = parts.name;
}
}
return [target];
case "JOIN":
channel = msg.params[0];