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.

channel_email_address: Fix web client missing `sender_id` parameter.

Prakhar Pratyush571849af91a2
diff --git a/web/src/stream_edit.ts b/web/src/stream_edit.ts
index 78afbf51c8d..34c084a2526 100644
--- a/web/src/stream_edit.ts
+++ b/web/src/stream_edit.ts
@@ -610,6 +610,7 @@ function show_stream_email_address_modal(address: string, sub: StreamSubscriptio
});
}
+ let sender_dropdown_widget: DropdownWidget;
function generate_email_modal_post_render(): void {
function update_option_label(sender: User | CurrentUser | Bot): string {
if (sender.user_id === people.EMAIL_GATEWAY_BOT.user_id) {
@@ -650,7 +651,7 @@ function show_stream_email_address_modal(address: string, sub: StreamSubscriptio
event.preventDefault();
}
- const sender_dropdown_widget = new dropdown_widget.DropdownWidget({
+ sender_dropdown_widget = new dropdown_widget.DropdownWidget({
widget_name: "sender_channel_email_address",
get_options,
item_click_callback,
@@ -667,7 +668,7 @@ function show_stream_email_address_modal(address: string, sub: StreamSubscriptio
dialog_widget.submit_api_request(
channel.get,
"/json/streams/" + sub.stream_id + "/email_address",
- {},
+ {sender_id: sender_dropdown_widget.value()},
{
success_continuation(response_data) {
const email = z.object({email: z.string()}).parse(response_data).email;