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_ui: Rename message type to have correct casing.

evykassirer86979b98c7f2
diff --git a/web/src/compose_ui.ts b/web/src/compose_ui.ts
index d2842ac01a2..d008427c358 100644
--- a/web/src/compose_ui.ts
+++ b/web/src/compose_ui.ts
@@ -23,7 +23,7 @@ import * as user_status from "./user_status";
import * as util from "./util";
// TODO: Refactor to push this into a field of ComposeTriggeredOptions.
-type messageType = "stream" | "private";
+type MessageType = "stream" | "private";
type ComposeTriggeredOptions = {
trigger: string;
private_message_recipient: string;
@@ -32,7 +32,7 @@ type ComposeTriggeredOptions = {
};
type ComposePlaceholderOptions = {
direct_message_user_ids: number[];
- message_type: messageType;
+ message_type: MessageType;
stream_id: number;
topic: string;
};
@@ -87,7 +87,7 @@ export function insert_and_scroll_into_view(
autosize_textarea($textarea);
}
-function get_focus_area(msg_type: messageType, opts: ComposeTriggeredOptions): string {
+function get_focus_area(msg_type: MessageType, opts: ComposeTriggeredOptions): string {
// Set focus to "Topic" when narrowed to a stream+topic
// and "Start new conversation" button clicked.
if (msg_type === "stream" && opts.stream_id && !opts.topic) {
@@ -111,7 +111,7 @@ function get_focus_area(msg_type: messageType, opts: ComposeTriggeredOptions): s
// Export for testing
export const _get_focus_area = get_focus_area;
-export function set_focus(msg_type: messageType, opts: ComposeTriggeredOptions): void {
+export function set_focus(msg_type: MessageType, opts: ComposeTriggeredOptions): void {
// Called mainly when opening the compose box or switching the
// message type to set the focus in the first empty input in the
// compose box.