Enable redirected media by default (#12142)

* Enable redirected media by default

See https://github.com/matrix-org/matrix-js-sdk/pull/4007

* Update the tests

* Update tests

* Update end-to-end tests too

* Update linkifier to use Media customisation endpoint

* Fix tests for new js-sdk behaviour

* Fix unchanged file

* Fix linkifier

* Fix lint
This commit is contained in:
Travis Ralston 2024-02-11 08:32:57 +01:00 committed by GitHub
parent d1928079cc
commit 86b3564b54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 6 deletions

View file

@ -80,7 +80,7 @@ export class Media {
*/
public get srcHttp(): string | null {
// eslint-disable-next-line no-restricted-properties
return this.client.mxcUrlToHttp(this.srcMxc) || null;
return this.client.mxcUrlToHttp(this.srcMxc, undefined, undefined, undefined, false, true) || null;
}
/**
@ -90,7 +90,7 @@ export class Media {
public get thumbnailHttp(): string | null {
if (!this.hasThumbnail) return null;
// eslint-disable-next-line no-restricted-properties
return this.client.mxcUrlToHttp(this.thumbnailMxc!);
return this.client.mxcUrlToHttp(this.thumbnailMxc!, undefined, undefined, undefined, false, true);
}
/**
@ -107,7 +107,7 @@ export class Media {
width = Math.floor(width * window.devicePixelRatio);
height = Math.floor(height * window.devicePixelRatio);
// eslint-disable-next-line no-restricted-properties
return this.client.mxcUrlToHttp(this.thumbnailMxc!, width, height, mode);
return this.client.mxcUrlToHttp(this.thumbnailMxc!, width, height, mode, false, true);
}
/**
@ -122,7 +122,7 @@ export class Media {
width = Math.floor(width * window.devicePixelRatio);
height = Math.floor(height * window.devicePixelRatio);
// eslint-disable-next-line no-restricted-properties
return this.client.mxcUrlToHttp(this.srcMxc, width, height, mode);
return this.client.mxcUrlToHttp(this.srcMxc, width, height, mode, false, true);
}
/**