bot-url: Remove topic if include topic option unchecked.

Previously, when a topic name was included in the URL
and the user unchecked the button for including a
topic, the URL was not being updated accordingly.

Expands the check for setting the topic parameter for
the topic not being an empty string and having the
include topic option checked.
This commit is contained in:
sujal 2024-03-12 15:23:23 +05:30 committed by Tim Abbott
parent 6f7e030eb2
commit 030fbfc3b7
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ export function show_generate_integration_url_modal(api_key: string): void {
const params = new URLSearchParams({api_key});
if (stream_id !== -1) {
params.set("stream", stream_id!.toString());
if (topic_name !== "") {
if ($override_topic.prop("checked") && topic_name !== "") {
params.set("topic", topic_name);
}
}