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.

send_later: Wildcard mention throwing error on send later.

Brijmohan Siyagb09a2637c4b3
diff --git a/web/src/popover_menus.js b/web/src/popover_menus.js
index eba00f17aef..d6c5facd4a9 100644
--- a/web/src/popover_menus.js
+++ b/web/src/popover_menus.js
@@ -239,7 +239,7 @@ function set_compose_box_schedule(element) {
return selected_send_at_time;
}
-export function open_send_later_menu(instance) {
+export function open_send_later_menu() {
if (!compose_validate.validate(true)) {
return;
}
@@ -248,11 +248,12 @@ export function open_send_later_menu(instance) {
const date = new Date();
const filtered_send_opts = scheduled_messages.get_filtered_send_opts(date);
$("body").append(render_send_later_modal(filtered_send_opts));
+ let interval;
overlays.open_modal("send_later_modal", {
autoremove: true,
on_show() {
- instance._interval = setInterval(
+ interval = setInterval(
scheduled_messages.update_send_later_options,
scheduled_messages.SCHEDULING_MODAL_UPDATE_INTERVAL_IN_MILLISECONDS,
);
@@ -312,7 +313,7 @@ export function open_send_later_menu(instance) {
$send_later_modal_overlay.trigger("focus");
},
on_hide() {
- clearInterval(instance._interval);
+ clearInterval(interval);
},
});
}
@@ -905,7 +906,7 @@ export function initialize() {
const send_at_timestamp = get_selected_send_later_timestamp();
do_schedule_message(send_at_timestamp);
});
- $popper.one("click", ".open_send_later_modal", () => open_send_later_menu(instance));
+ $popper.one("click", ".open_send_later_modal", open_send_later_menu);
},
onHidden(instance) {
instance.destroy();