You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Allow popping out a Jitsi widget to respect Desktop web_base_url
config (#12376)
* Allow popping out a Jitsi widget to respect Desktop `web_base_url` config Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
21190045c1
commit
ddadbf64fe
@ -521,7 +521,7 @@ export default class WidgetUtils {
|
|||||||
// safe to send.
|
// safe to send.
|
||||||
// We'll end up using a local render URL when we see a Jitsi widget anyways, so this is
|
// We'll end up using a local render URL when we see a Jitsi widget anyways, so this is
|
||||||
// really just for backwards compatibility and to appease the spec.
|
// really just for backwards compatibility and to appease the spec.
|
||||||
baseUrl = "https://app.element.io/";
|
baseUrl = PlatformPeg.get()!.baseUrl;
|
||||||
}
|
}
|
||||||
const url = new URL("jitsi.html#" + queryString, baseUrl); // this strips hash fragment from baseUrl
|
const url = new URL("jitsi.html#" + queryString, baseUrl); // this strips hash fragment from baseUrl
|
||||||
return url.href;
|
return url.href;
|
||||||
|
@ -19,6 +19,15 @@ import WidgetUtils from "../../src/utils/WidgetUtils";
|
|||||||
import { mockPlatformPeg } from "../test-utils";
|
import { mockPlatformPeg } from "../test-utils";
|
||||||
|
|
||||||
describe("getLocalJitsiWrapperUrl", () => {
|
describe("getLocalJitsiWrapperUrl", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
Object.defineProperty(window, "location", {
|
||||||
|
value: {
|
||||||
|
origin: "https://app.element.io",
|
||||||
|
pathname: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("should generate jitsi URL (for defaults)", () => {
|
it("should generate jitsi URL (for defaults)", () => {
|
||||||
mockPlatformPeg();
|
mockPlatformPeg();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user