Pass the current language to Element Call (#9427)
This allows the Element Call to appear in the language used by the rest of the app.
This commit is contained in:
+3
-1
@@ -42,6 +42,7 @@ import WidgetStore from "../stores/WidgetStore";
|
|||||||
import { WidgetMessagingStore, WidgetMessagingStoreEvent } from "../stores/widgets/WidgetMessagingStore";
|
import { WidgetMessagingStore, WidgetMessagingStoreEvent } from "../stores/widgets/WidgetMessagingStore";
|
||||||
import ActiveWidgetStore, { ActiveWidgetStoreEvent } from "../stores/ActiveWidgetStore";
|
import ActiveWidgetStore, { ActiveWidgetStoreEvent } from "../stores/ActiveWidgetStore";
|
||||||
import PlatformPeg from "../PlatformPeg";
|
import PlatformPeg from "../PlatformPeg";
|
||||||
|
import { getCurrentLanguage } from "../languageHandler";
|
||||||
|
|
||||||
const TIMEOUT_MS = 16000;
|
const TIMEOUT_MS = 16000;
|
||||||
|
|
||||||
@@ -626,7 +627,7 @@ export class ElementCall extends Call {
|
|||||||
|
|
||||||
private constructor(public readonly groupCall: MatrixEvent, client: MatrixClient) {
|
private constructor(public readonly groupCall: MatrixEvent, client: MatrixClient) {
|
||||||
// Splice together the Element Call URL for this call
|
// 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";
|
url.pathname = "/room";
|
||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
embed: "",
|
embed: "",
|
||||||
@@ -635,6 +636,7 @@ export class ElementCall extends Call {
|
|||||||
userId: client.getUserId()!,
|
userId: client.getUserId()!,
|
||||||
deviceId: client.getDeviceId(),
|
deviceId: client.getDeviceId(),
|
||||||
roomId: groupCall.getRoomId()!,
|
roomId: groupCall.getRoomId()!,
|
||||||
|
lang: getCurrentLanguage().replace("_", "-"),
|
||||||
});
|
});
|
||||||
// Currently, the screen-sharing support is the same is it is for Jitsi
|
// Currently, the screen-sharing support is the same is it is for Jitsi
|
||||||
if (!PlatformPeg.get().supportsJitsiScreensharing()) {
|
if (!PlatformPeg.get().supportsJitsiScreensharing()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user