inbox: Fill compose with dm/stream info for reply on inbox-header.

This commit is contained in:
Aman Agrawal
2023-10-06 22:18:41 +00:00
committed by Tim Abbott
parent 2561e7f2d8
commit bb740ca65e
2 changed files with 17 additions and 8 deletions

View File

@@ -30,13 +30,15 @@ export function respond_to_message(opts) {
return;
}
} else if (inbox_util.is_visible()) {
message = inbox_ui.get_focused_row_message();
if (message === undefined) {
// Open empty compose with nothing pre-filled since
// user is not focused on any table row.
compose_actions.start("stream", {trigger: "inbox_nofocus"});
const message_opts = inbox_ui.get_focused_row_message();
if (message_opts.message === undefined) {
compose_actions.start(message_opts.msg_type, {
trigger: "inbox_nofocus",
stream_id: message_opts.stream_id,
});
return;
}
message = message_opts.message;
} else {
message = message_lists.current.selected_message();