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_actions: Warn callers if msg_type is not defined.

Aman Agrawal742b985de028
diff --git a/web/src/compose_actions.js b/web/src/compose_actions.js
index ab7b31b0907..ee84a472dfb 100644
--- a/web/src/compose_actions.js
+++ b/web/src/compose_actions.js
@@ -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()) {
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index a9496fa2e52..1991d565a5d 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -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%);