bots: Add a setting to customize the Welcome Bot message.

This commit includes the following changes:
- Add an administrator setting to customize the Welcome Bot
message when sending an invitation.
- Add an API endpoint to test the customized Welcome Bot message
by sending a copy of the message to the administrator.

Fixes #27663.

Co-authored-by: Akarsh Jain <akarsh.jain.790@gmail.com>
This commit is contained in:
Saubhagya Patel
2025-07-30 19:57:50 +05:30
committed by Tim Abbott
parent 4cafe5f77c
commit bb5c87e306
35 changed files with 988 additions and 32 deletions

View File

@@ -869,6 +869,24 @@ export function initialize(): void {
},
});
tippy.delegate("body", {
target: "#welcome_message_custom_text_buttons_container",
onShow(instance) {
const $elem = $(instance.reference);
if ($($elem).find("#send_test_welcome_bot_custom_message").prop("disabled")) {
const content = $t({defaultMessage: "Welcome Bot message text is required."});
instance.setContent(content);
return undefined;
}
instance.destroy();
return false;
},
appendTo: () => document.body,
onHidden(instance) {
instance.destroy();
},
});
tippy.delegate("body", {
target: ".topic-edit-save-wrapper",
onShow(instance) {