1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Support Matrix 1.1 (drop legacy r0 versions) (#9819)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Travis Ralston
2023-08-14 02:25:13 -06:00
committed by GitHub
parent f9e79fd5d6
commit 180fcaa70f
32 changed files with 712 additions and 440 deletions

View File

@@ -56,7 +56,7 @@ describe("<MImageBody/>", () => {
},
}),
});
const url = "https://server/_matrix/media/r0/download/server/encrypted-image";
const url = "https://server/_matrix/media/v3/download/server/encrypted-image";
// eslint-disable-next-line no-restricted-properties
cli.mxcUrlToHttp.mockImplementation(
(mxcUrl: string, width?: number, height?: number, resizeMethod?: string, allowDirectLinks?: boolean) => {
@@ -179,8 +179,8 @@ describe("<MImageBody/>", () => {
});
it("should fall back to /download/ if /thumbnail/ fails", async () => {
const thumbUrl = "https://server/_matrix/media/r0/thumbnail/server/image?width=800&height=600&method=scale";
const downloadUrl = "https://server/_matrix/media/r0/download/server/image";
const thumbUrl = "https://server/_matrix/media/v3/thumbnail/server/image?width=800&height=600&method=scale";
const downloadUrl = "https://server/_matrix/media/v3/download/server/image";
const event = new MatrixEvent({
room_id: "!room:server",
@@ -227,7 +227,7 @@ describe("<MImageBody/>", () => {
mocked(global.URL.createObjectURL).mockReturnValue("blob:generated-thumb");
fetchMock.getOnce(
"https://server/_matrix/media/r0/download/server/image",
"https://server/_matrix/media/v3/download/server/image",
{
body: fs.readFileSync(path.resolve(__dirname, "..", "..", "..", "images", "animated-logo.webp")),
},