mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
compose_actions: Include message type in opts for start.
This commit is contained in:
@@ -28,7 +28,10 @@ export function respond_to_message(opts) {
|
||||
if (message === undefined) {
|
||||
// Open empty compose with nothing pre-filled since
|
||||
// user is not focused on any table row.
|
||||
compose_actions.start("stream", {trigger: "recent_view_nofocus"});
|
||||
compose_actions.start({
|
||||
message_type: "stream",
|
||||
trigger: "recent_view_nofocus",
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else if (inbox_util.is_visible()) {
|
||||
@@ -36,7 +39,8 @@ export function respond_to_message(opts) {
|
||||
if (message_opts.message === undefined) {
|
||||
// If the user is not focused on inbox header, msg_type
|
||||
// is not defined, so we open empty compose with nothing prefilled.
|
||||
compose_actions.start(message_opts.msg_type ?? "stream", {
|
||||
compose_actions.start({
|
||||
message_type: message_opts.msg_type ?? "stream",
|
||||
trigger: "inbox_nofocus",
|
||||
...message_opts,
|
||||
});
|
||||
@@ -56,7 +60,10 @@ export function respond_to_message(opts) {
|
||||
!narrow_state.narrowed_by_stream_reply() &&
|
||||
!narrow_state.narrowed_by_topic_reply()
|
||||
) {
|
||||
compose_actions.start("stream", {trigger: "empty_narrow_compose"});
|
||||
compose_actions.start({
|
||||
message_type: "stream",
|
||||
trigger: "empty_narrow_compose",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const current_filter = narrow_state.filter();
|
||||
@@ -65,7 +72,10 @@ export function respond_to_message(opts) {
|
||||
const first_operand = first_term.operand;
|
||||
|
||||
if (first_operator === "stream" && !stream_data.is_subscribed_by_name(first_operand)) {
|
||||
compose_actions.start("stream", {trigger: "empty_narrow_compose"});
|
||||
compose_actions.start({
|
||||
message_type: "stream",
|
||||
trigger: "empty_narrow_compose",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -80,7 +90,7 @@ export function respond_to_message(opts) {
|
||||
msg_type,
|
||||
opts,
|
||||
);
|
||||
compose_actions.start(new_opts.message_type, new_opts);
|
||||
compose_actions.start(new_opts);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -113,7 +123,8 @@ export function respond_to_message(opts) {
|
||||
pm_recipient = people.pm_reply_to(message);
|
||||
}
|
||||
|
||||
compose_actions.start(msg_type, {
|
||||
compose_actions.start({
|
||||
message_type: msg_type,
|
||||
stream_id,
|
||||
topic,
|
||||
private_message_recipient: pm_recipient,
|
||||
|
||||
Reference in New Issue
Block a user