Skip to content

Commit bdc4a69

Browse files
authored
Fix stable-suffixed MSC4133 support (#4983)
* Fix stable-suffixed MSC4133 support It looked for the ".stable" suffixed feature to work out what URL to use but not to see whether the server supported it. This will only be relevant until the next spec release but may as well fix it. See also element-hq/element-web#30649 * Fix awaiting
1 parent ab89242 commit bdc4a69

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/client.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ export const UNSTABLE_MSC2666_QUERY_MUTUAL_ROOMS = "uk.half-shot.msc2666.query_m
542542
export const UNSTABLE_MSC4140_DELAYED_EVENTS = "org.matrix.msc4140";
543543

544544
export const UNSTABLE_MSC4133_EXTENDED_PROFILES = "uk.tcpip.msc4133";
545+
export const STABLE_MSC4133_EXTENDED_PROFILES = "uk.tcpip.msc4133.stable";
545546

546547
enum CrossSigningKeyType {
547548
MasterKey = "master_key",
@@ -6903,7 +6904,10 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
69036904
* @returns `true` if supported, otherwise `false`
69046905
*/
69056906
public async doesServerSupportExtendedProfiles(): Promise<boolean> {
6906-
return this.doesServerSupportUnstableFeature(UNSTABLE_MSC4133_EXTENDED_PROFILES);
6907+
return (
6908+
(await this.doesServerSupportUnstableFeature(UNSTABLE_MSC4133_EXTENDED_PROFILES)) ||
6909+
(await this.doesServerSupportUnstableFeature(STABLE_MSC4133_EXTENDED_PROFILES))
6910+
);
69076911
}
69086912

69096913
/**

0 commit comments

Comments
 (0)