components/buffer: handle TOPIC clear messages

This commit is contained in:
Simon Ser 2024-12-03 09:19:53 +01:00
parent 4d988c98d0
commit ec5e67336f

View File

@ -274,9 +274,15 @@ class LogLine extends Component {
break; break;
case "TOPIC": case "TOPIC":
let topic = msg.params[1]; let topic = msg.params[1];
content = html` if (topic) {
${createNick(msg.prefix.name)} changed the topic to: ${linkify(stripANSI(topic), onChannelClick)} content = html`
`; ${createNick(msg.prefix.name)} changed the topic to: ${linkify(stripANSI(topic), onChannelClick)}
`;
} else {
content = html`
${createNick(msg.prefix.name)} cleared the topic
`;
}
break; break;
case "INVITE": case "INVITE":
invitee = msg.params[0]; invitee = msg.params[0];