From ec5e67336f55809e8a132983e69a3a10492c0ec2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 3 Dec 2024 09:19:53 +0100 Subject: [PATCH] components/buffer: handle TOPIC clear messages --- components/buffer.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/buffer.js b/components/buffer.js index 0bb5fd5..52c9771 100644 --- a/components/buffer.js +++ b/components/buffer.js @@ -274,9 +274,15 @@ class LogLine extends Component { break; case "TOPIC": let topic = msg.params[1]; - content = html` - ${createNick(msg.prefix.name)} changed the topic to: ${linkify(stripANSI(topic), onChannelClick)} - `; + if (topic) { + 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; case "INVITE": invitee = msg.params[0];