Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Pass the current language to Element Call #9427

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/models/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import WidgetStore from "../stores/WidgetStore";
import { WidgetMessagingStore, WidgetMessagingStoreEvent } from "../stores/widgets/WidgetMessagingStore";
import ActiveWidgetStore, { ActiveWidgetStoreEvent } from "../stores/ActiveWidgetStore";
import PlatformPeg from "../PlatformPeg";
import { getCurrentLanguage } from "../languageHandler";

const TIMEOUT_MS = 16000;

Expand Down Expand Up @@ -626,7 +627,7 @@ export class ElementCall extends Call {

private constructor(public readonly groupCall: MatrixEvent, client: MatrixClient) {
// Splice together the Element Call URL for this call
const url = new URL(SdkConfig.get("element_call").url ?? DEFAULTS.element_call.url);
const url = new URL(SdkConfig.get("element_call").url ?? DEFAULTS.element_call.url!);
url.pathname = "/room";
const params = new URLSearchParams({
embed: "",
Expand All @@ -635,6 +636,7 @@ export class ElementCall extends Call {
userId: client.getUserId()!,
deviceId: client.getDeviceId(),
roomId: groupCall.getRoomId()!,
lang: getCurrentLanguage().replace("_", "-"),
});
// Currently, the screen-sharing support is the same is it is for Jitsi
if (!PlatformPeg.get().supportsJitsiScreensharing()) {
Expand Down