diff --git a/src/v1/thirdparty.rs b/src/v1/thirdparty.rs index 18fe481b..16e40245 100644 --- a/src/v1/thirdparty.rs +++ b/src/v1/thirdparty.rs @@ -6,7 +6,7 @@ pub mod get_protocol; pub mod get_user_for_protocol; pub mod get_user_for_user_id; -use std::collections::HashMap; +use std::collections::BTreeMap; use ruma_identifiers::{RoomAliasId, UserId}; @@ -22,7 +22,7 @@ pub struct Protocol { /// A content URI representing an icon for the third party protocol. pub icon: String, /// The type definitions for the fields defined in `user_fields` and `location_fields`. - pub field_types: HashMap, + pub field_types: BTreeMap, /// A list of objects representing independent instances of configuration. pub instances: Vec, } @@ -36,7 +36,7 @@ pub struct ProtocolInstance { #[serde(skip_serializing_if = "Option::is_none")] pub icon: Option, /// Preset values for `fields` the client may use to search by. - pub fields: HashMap, + pub fields: BTreeMap, /// A unique identifier across all instances. pub network_id: String, } @@ -58,7 +58,7 @@ pub struct Location { /// The protocol ID that the third party location is a part of. pub protocol: String, /// Information used to identify this third party location. - pub fields: HashMap, + pub fields: BTreeMap, } /// A third party network user. @@ -69,5 +69,5 @@ pub struct User { /// The protocol ID that the third party user is a part of. pub protocol: String, /// Information used to identify this third party user. - pub fields: HashMap, + pub fields: BTreeMap, } diff --git a/src/v1/thirdparty/get_location_for_protocol.rs b/src/v1/thirdparty/get_location_for_protocol.rs index f39154b3..6c791fd3 100644 --- a/src/v1/thirdparty/get_location_for_protocol.rs +++ b/src/v1/thirdparty/get_location_for_protocol.rs @@ -1,6 +1,6 @@ //! [GET /_matrix/app/v1/thirdparty/location/{protocol}](https://matrix.org/docs/spec/application_service/r0.1.2#get-matrix-app-v1-thirdparty-location-protocol) -use std::collections::HashMap; +use std::collections::BTreeMap; use ruma_api::ruma_api; @@ -23,7 +23,7 @@ ruma_api! { /// One or more custom fields to help identify the third party location. // The specification is incorrect for this parameter. See matrix-org/matrix-doc#2352. #[ruma_api(query_map)] - pub fields: HashMap, + pub fields: BTreeMap, } response { diff --git a/src/v1/thirdparty/get_user_for_protocol.rs b/src/v1/thirdparty/get_user_for_protocol.rs index 1fe4aebb..f9fb14a2 100644 --- a/src/v1/thirdparty/get_user_for_protocol.rs +++ b/src/v1/thirdparty/get_user_for_protocol.rs @@ -1,6 +1,6 @@ //! [GET /_matrix/app/v1/thirdparty/user/{protocol}](https://matrix.org/docs/spec/application_service/r0.1.2#get-matrix-app-v1-thirdparty-user-protocol) -use std::collections::HashMap; +use std::collections::BTreeMap; use ruma_api::ruma_api; @@ -23,7 +23,7 @@ ruma_api! { /// One or more custom fields that are passed to the AS to help identify the user. // The specification is incorrect for this parameter. See matrix-org/matrix-doc#2352. #[ruma_api(query_map)] - pub fields: HashMap, + pub fields: BTreeMap, } response {