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.
This commit is contained in:
Reto Brunner 2024-07-16 22:22:13 +02:00
parent e2ddabe032
commit 718db3ae88

View file

@ -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});
}
};