From 718db3ae88f7480b79b6c0ac4a591d1ce6c7f365 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Tue, 16 Jul 2024 22:22:13 +0200 Subject: [PATCH] client: use topic command in topic change A user on IRC reported a bug where the topic would change to ":hello" when the topic was modified to "hello" via the channel topic edit field. The reason is that irc-framework also sanitizes /RAW commands and hence our manually escaped trailing param gets another ":" (which I'm not exactly sure it should be doing... /raw means raw in my world, but oh well). We do have a proper /topic command a user could be using, so the fix is to just do that in the input box as well. --- client/components/Chat.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/components/Chat.vue b/client/components/Chat.vue index 41f7ca11..b1447ed6 100644 --- a/client/components/Chat.vue +++ b/client/components/Chat.vue @@ -211,7 +211,7 @@ export default defineComponent({ if (props.channel.topic !== newTopic) { const target = props.channel.id; - const text = `/raw TOPIC ${props.channel.name} :${newTopic}`; + const text = `/topic ${newTopic}`; socket.emit("input", {target, text}); } };