Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

bots: Rename INCOMING_WEBHOOK_BOT_TYPE to INCOMING_WEBHOOK_BOT_TYPE_INT.

sathwikshetty3366ac1f53a596
diff --git a/web/src/settings_bots.ts b/web/src/settings_bots.ts
index 41b88b58e2c..1e9225e9ba1 100644
--- a/web/src/settings_bots.ts
+++ b/web/src/settings_bots.ts
@@ -36,7 +36,7 @@ import * as user_sort from "./user_sort.ts";
import * as util from "./util.ts";
const GENERIC_BOT_TYPE = 1;
-const INCOMING_WEBHOOK_BOT_TYPE = 2;
+const INCOMING_WEBHOOK_BOT_TYPE_INT = 2;
const OUTGOING_WEBHOOK_BOT_TYPE = "3";
const OUTGOING_WEBHOOK_BOT_TYPE_INT = 3;
const EMBEDDED_BOT_TYPE = "4";
@@ -331,7 +331,7 @@ export function add_a_new_bot(): void {
}
function set_up_form_fields(): void {
- $("#create_bot_type").val(INCOMING_WEBHOOK_BOT_TYPE);
+ $("#create_bot_type").val(INCOMING_WEBHOOK_BOT_TYPE_INT);
$("#payload_url_inputbox").hide();
$("#create_payload_url").val("");
$("#service_name_list").hide();
@@ -447,7 +447,7 @@ function bot_info(bot_user_id: number): BotInfo {
}),
show_download_zuliprc_button: is_bot_owner && bot_user.bot_type === GENERIC_BOT_TYPE,
show_generate_integration_url_button:
- can_modify_bot && bot_user.bot_type === INCOMING_WEBHOOK_BOT_TYPE,
+ can_modify_bot && bot_user.bot_type === INCOMING_WEBHOOK_BOT_TYPE_INT,
};
}