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_call: Rename `video_call_xhrs` to `call_xhrs`.

apoorvapendse827317b6943f
diff --git a/web/src/compose_call.ts b/web/src/compose_call.ts
index 065f4740ad3..45d8f582b39 100644
--- a/web/src/compose_call.ts
+++ b/web/src/compose_call.ts
@@ -1,7 +1,7 @@
import {realm} from "./state_data.ts";
export const zoom_token_callbacks = new Map();
-export const video_call_xhrs = new Map<string, JQuery.jqXHR<unknown>>();
+export const call_xhrs = new Map<string, JQuery.jqXHR<unknown>>();
export const ignored_call_xhrs = new Set<JQuery.jqXHR>();
export function get_jitsi_server_url(video_call_id?: string): URL | null {
@@ -18,13 +18,13 @@ export function get_jitsi_server_url(video_call_id?: string): URL | null {
export function abort_video_callbacks(edit_message_id = ""): void {
zoom_token_callbacks.delete(edit_message_id);
- const xhr = video_call_xhrs.get(edit_message_id);
+ const xhr = call_xhrs.get(edit_message_id);
if (xhr !== undefined) {
// TODO: Use xhr.abort(), if XHR methods are available
// after https://github.com/getsentry/sentry-javascript/issues/19242
// gets resolved.
ignored_call_xhrs.add(xhr);
- video_call_xhrs.delete(edit_message_id);
+ call_xhrs.delete(edit_message_id);
}
}
diff --git a/web/src/compose_call_ui.ts b/web/src/compose_call_ui.ts
index 5539ac3e08d..ff8d5aeaa68 100644
--- a/web/src/compose_call_ui.ts
+++ b/web/src/compose_call_ui.ts
@@ -81,7 +81,7 @@ export function generate_and_insert_audio_or_video_call_link(
return;
}
const data = call_response_schema.parse(res);
- compose_call.video_call_xhrs.delete(key);
+ compose_call.call_xhrs.delete(key);
if (is_audio_call) {
insert_audio_call_url(data.url, $target_textarea);
} else {
@@ -92,7 +92,7 @@ export function generate_and_insert_audio_or_video_call_link(
if (xhr && compose_call.ignored_call_xhrs.has(xhr)) {
return;
}
- compose_call.video_call_xhrs.delete(key);
+ compose_call.call_xhrs.delete(key);
const parsed = z.object({code: z.string()}).safeParse(_xhr.responseJSON);
if (
status === "error" &&
@@ -115,7 +115,7 @@ export function generate_and_insert_audio_or_video_call_link(
},
});
if (xhr !== undefined) {
- compose_call.video_call_xhrs.set(key, xhr);
+ compose_call.call_xhrs.set(key, xhr);
}
};
@@ -163,14 +163,14 @@ export function generate_and_insert_audio_or_video_call_link(
return;
}
const data = call_response_schema.parse(response);
- compose_call.video_call_xhrs.delete(key);
+ compose_call.call_xhrs.delete(key);
insert_video_call_url(data.url, $target_textarea);
},
error(_xhr, status) {
if (xhr && compose_call.ignored_call_xhrs.has(xhr)) {
return;
}
- compose_call.video_call_xhrs.delete(key);
+ compose_call.call_xhrs.delete(key);
if (status !== "abort") {
ui_report.generic_embed_error(
$t_html({defaultMessage: "Failed to create video call."}),
@@ -181,7 +181,7 @@ export function generate_and_insert_audio_or_video_call_link(
});
if (xhr !== undefined) {
- compose_call.video_call_xhrs.set(key, xhr);
+ compose_call.call_xhrs.set(key, xhr);
}
break;