mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
compose: Allow message_id to be passed into quote_and_reply.
Up until now, the currently selected message was the one that was always quoted. Now if there's a message_id passed in, we'll quote that message instead, otherwise we'll fall back on the selected message. This is a prep commit for allowing quoting and replying while editing a message sent earlier.
This commit is contained in:
@@ -126,8 +126,8 @@ export function reply_with_mention(opts) {
|
||||
|
||||
export function quote_and_reply(opts) {
|
||||
const $textarea = $("textarea#compose-textarea");
|
||||
const message_id = message_lists.current.selected_id();
|
||||
const message = message_lists.current.selected_message();
|
||||
const message_id = opts.message_id || message_lists.current.selected_id();
|
||||
const message = message_lists.current.get(message_id);
|
||||
const quoting_placeholder = $t({defaultMessage: "[Quoting…]"});
|
||||
|
||||
if (!compose_state.has_message_content()) {
|
||||
|
||||
Reference in New Issue
Block a user