compose_actions: Warn callers if msg_type is not defined.

This commit is contained in:
Aman Agrawal 2023-10-17 05:54:53 +00:00 committed by Tim Abbott
parent c54e84cb9b
commit 742b985de0
2 changed files with 11 additions and 1 deletions

View File

@ -3,6 +3,7 @@
import autosize from "autosize";
import $ from "jquery";
import * as blueslip from "./blueslip";
import * as compose_banner from "./compose_banner";
import * as compose_fade from "./compose_fade";
import * as compose_pm_pill from "./compose_pm_pill";
@ -181,6 +182,15 @@ export function start(msg_type, opts) {
return;
}
if (!msg_type) {
// We prefer callers to be explicit about the message type, but
// we if we don't know, we open a stream compose box by default,
// which opens stream selection dropdown.
// Also, msg_type is used to check if compose box is open in compose_state.composing().
msg_type = "stream";
blueslip.warn("Empty message type in compose.start");
}
autosize_message_content();
if (reload_state.is_in_progress()) {

View File

@ -279,7 +279,7 @@ body {
--color-inbox-search-text: hsl(0deg 0% 0%);
--color-border-inbox-search: hsl(229.09deg 21.57% 10% / 30%);
--color-border-inbox-search-hover: hsl(229.09deg 21.57% 10% / 60%);
--color-background-inbox-search: hsl(0deg, 0%, 100%);
--color-background-inbox-search: hsl(0deg 0% 100%);
--color-background-inbox-search-hover: hsl(0deg 0% 100%);
--color-background-inbox-search-focus: hsl(0deg 0% 100%);
--color-border-inbox-search-focus: hsl(229.09deg 21.57% 10% / 80%);