diff --git a/src/client.ts b/src/client.ts index 850803a17a..52029ce475 100644 --- a/src/client.ts +++ b/src/client.ts @@ -6980,6 +6980,7 @@ export class MatrixClient extends TypedEventEmitter { 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 { - 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"; diff --git a/src/models/profile-keys.ts b/src/models/profile-keys.ts index c33256233f..6075f9aa68 100644 --- a/src/models/profile-keys.ts +++ b/src/models/profile-keys.ts @@ -1,8 +1,33 @@ +/* +Copyright 2025 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/** + * The timezone the user is currently in. The value of this property should + * match a timezone provided in https://www.iana.org/time-zones. + * + * This key was introduced in Matrix v1.16. + */ +export const ProfileKeyTimezone = "m.tz"; + /** * The timezone the user is currently in. The value of this property should * match a timezone provided in https://www.iana.org/time-zones. * * @see https://github.com/matrix-org/matrix-spec-proposals/blob/clokep/profile-tz/proposals/4175-profile-field-time-zone.md * @experimental + * @deprecated Unstable MSC field - Use `ProfileKeyTimezone` */ export const ProfileKeyMSC4175Timezone = "us.cloke.msc4175.tz"; diff --git a/src/serverCapabilities.ts b/src/serverCapabilities.ts index 3d3387fe43..15db201c63 100644 --- a/src/serverCapabilities.ts +++ b/src/serverCapabilities.ts @@ -64,6 +64,10 @@ export interface Capabilities { "m.set_displayname"?: ISetDisplayNameCapability; "m.set_avatar_url"?: ISetAvatarUrlCapability; "uk.tcpip.msc4133.profile_fields"?: IProfileFieldsCapability; + /** + * Since Matrix v1.16 + */ + "m.profile_fields"?: IProfileFieldsCapability; } type CapabilitiesResponse = {