mirror of https://github.com/zulip/zulip.git
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:
parent
6f7e030eb2
commit
030fbfc3b7
|
@ -74,7 +74,7 @@ export function show_generate_integration_url_modal(api_key: string): void {
|
||||||
const params = new URLSearchParams({api_key});
|
const params = new URLSearchParams({api_key});
|
||||||
if (stream_id !== -1) {
|
if (stream_id !== -1) {
|
||||||
params.set("stream", stream_id!.toString());
|
params.set("stream", stream_id!.toString());
|
||||||
if (topic_name !== "") {
|
if ($override_topic.prop("checked") && topic_name !== "") {
|
||||||
params.set("topic", topic_name);
|
params.set("topic", topic_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue