1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-16 09:42:23 +03:00

Stabilise extended profiles (now part of Matrix v1.16) (#5013)

* Stabilise extended profiles (v1.16)

* lint

* Add capacity

* Update profile keys

* copyright

* lint
This commit is contained in:
Will Hunt
2025-10-06 16:10:15 +01:00
committed by GitHub
parent d1d9aba745
commit e885ecf08d
3 changed files with 34 additions and 1 deletions

View File

@@ -6980,6 +6980,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
*/
public async doesServerSupportExtendedProfiles(): Promise<boolean> {
return (
(await this.isVersionSupported("v1.16")) ||
(await this.doesServerSupportUnstableFeature(UNSTABLE_MSC4133_EXTENDED_PROFILES)) ||
(await this.doesServerSupportUnstableFeature(STABLE_MSC4133_EXTENDED_PROFILES))
);
@@ -6991,7 +6992,10 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @returns The prefix for use with `authedRequest`
*/
private async getExtendedProfileRequestPrefix(): Promise<string> {
if (await this.doesServerSupportUnstableFeature("uk.tcpip.msc4133.stable")) {
if (
(await this.isVersionSupported("v1.16")) ||
(await this.doesServerSupportUnstableFeature("uk.tcpip.msc4133.stable"))
) {
return ClientPrefix.V3;
}
return "/_matrix/client/unstable/uk.tcpip.msc4133";