Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose_call: Convert module to TypeScript.
Anders Kaseorg340b0a118138
diff --git a/web/src/compose_call.js b/web/src/compose_call.tssimilarity index 83%rename from web/src/compose_call.jsrename to web/src/compose_call.tsindex 3ba7f6e4deb..c39d5992c16 100644--- a/web/src/compose_call.js+++ b/web/src/compose_call.ts@@ -3,11 +3,11 @@ import {page_params} from "./page_params";export const zoom_token_callbacks = new Map();export const video_call_xhrs = new Map();-export function get_jitsi_server_url() {+export function get_jitsi_server_url(): string | null {return page_params.realm_jitsi_server_url ?? page_params.server_jitsi_server_url;}-export function abort_video_callbacks(edit_message_id = "") {+export function abort_video_callbacks(edit_message_id = ""): void {zoom_token_callbacks.delete(edit_message_id);if (video_call_xhrs.has(edit_message_id)) {video_call_xhrs.get(edit_message_id).abort();@@ -15,7 +15,7 @@ export function abort_video_callbacks(edit_message_id = "") {}}-export function compute_show_video_chat_button() {+export function compute_show_video_chat_button(): boolean {const available_providers = page_params.realm_available_video_chat_providers;if (page_params.realm_video_chat_provider === available_providers.disabled.id) {return false;@@ -31,7 +31,7 @@ export function compute_show_video_chat_button() {return true;}-export function compute_show_audio_chat_button() {+export function compute_show_audio_chat_button(): boolean {const available_providers = page_params.realm_available_video_chat_providers;if ((available_providers.jitsi_meet &&diff --git a/web/src/page_params.ts b/web/src/page_params.tsindex 06ac12d9c5d..70749a98e81 100644--- a/web/src/page_params.ts+++ b/web/src/page_params.ts@@ -34,6 +34,12 @@ export const page_params: {page_load_time: number;promote_sponsoring_zulip: boolean;realm_add_custom_emoji_policy: number;+ realm_available_video_chat_providers: {+ disabled: {name: string; id: number};+ jitsi_meet: {name: string; id: number};+ zoom?: {name: string; id: number};+ big_blue_button?: {name: string; id: number};+ };realm_avatar_changes_disabled: boolean;realm_create_multiuse_invite_group: number;realm_create_private_stream_policy: number;@@ -48,6 +54,7 @@ export const page_params: {realm_invite_to_realm_policy: number;realm_invite_to_stream_policy: number;realm_is_zephyr_mirror_realm: boolean;+ realm_jitsi_server_url: string | null;realm_logo_source: string;realm_logo_url: string;realm_move_messages_between_streams_policy: number;@@ -64,9 +71,11 @@ export const page_params: {realm_upload_quota_mib: number | null;realm_uri: string;realm_user_group_edit_policy: number;+ realm_video_chat_provider: number;realm_waiting_period_threshold: number;request_language: string;server_avatar_changes_disabled: boolean;+ server_jitsi_server_url: string | null;server_name_changes_disabled: boolean;server_needs_upgrade: boolean;server_presence_offline_threshold_seconds: number;