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.

settings: Update confirmation modal shown when reactivating a bot.

Sahil Batra1b9fb037a10f
diff --git a/web/src/settings_users.js b/web/src/settings_users.js
index b07735c1705..d6ebc114335 100644
--- a/web/src/settings_users.js
+++ b/web/src/settings_users.js
@@ -578,6 +578,11 @@ export function confirm_reactivation(user_id, handle_confirm, loading_spinner) {
let html_body;
// check if bot or human
if (user.is_bot) {
+ opts.original_owner_deactivated =
+ user.is_bot && user.bot_owner_id && !people.is_person_active(user.bot_owner_id);
+ if (opts.original_owner_deactivated) {
+ opts.owner_name = people.get_by_user_id(user.bot_owner_id).full_name;
+ }
html_body = render_settings_reactivation_bot_modal(opts);
} else {
html_body = render_settings_reactivation_user_modal(opts);
diff --git a/web/templates/confirm_dialog/confirm_reactivate_bot.hbs b/web/templates/confirm_dialog/confirm_reactivate_bot.hbs
index b9a336d6acf..7fbe1ea7d92 100644
--- a/web/templates/confirm_dialog/confirm_reactivate_bot.hbs
+++ b/web/templates/confirm_dialog/confirm_reactivate_bot.hbs
@@ -5,3 +5,12 @@
{{#*inline "z-user"}}<strong>{{username}}</strong>{{/inline}}
{{/tr}}
</p>
+{{#if original_owner_deactivated}}
+ <p>
+ {{#tr}}
+ Because the original owner of this bot <z-bot-owner></z-bot-owner> is deactivated, you will become the owner for this bot.
+ {{#*inline "z-bot-owner"}}<strong>{{owner_name}}</strong>{{/inline}}
+ {{/tr}}
+ {{t "However, it will no longer be subscribed to the private streams that you are not subscribed to." }}
+ </p>
+{{/if}}