mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 11:33:51 +00:00
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:
committed by
Tim Abbott
parent
4cafe5f77c
commit
bb5c87e306
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user