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.

compose: Pass in the message_id when quoting from the message's popover.

N-Shar-ma19281b584e9b
diff --git a/web/src/message_actions_popover.js b/web/src/message_actions_popover.js
index ccd2573771d..4bfeca1c801 100644
--- a/web/src/message_actions_popover.js
+++ b/web/src/message_actions_popover.js
@@ -106,12 +106,8 @@ export function initialize() {
// instance.hide gets called.
const $popper = $(instance.popper);
$popper.one("click", ".respond_button", (e) => {
- // Arguably, we should fetch the message ID to respond to from
- // e.target, but that should always be the current selected
- // message in the current message list (and
- // compose_reply.respond_to_message doesn't take a message
- // argument).
- compose_reply.quote_and_reply({trigger: "popover respond"});
+ const message_id = $(e.currentTarget).data("message-id");
+ compose_reply.quote_and_reply({trigger: "popover respond", message_id});
e.preventDefault();
e.stopPropagation();
instance.hide();