Skip to content

Commit

Permalink
client-api: add unstable MSC4121 support (moderator role definition)
Browse files Browse the repository at this point in the history
Signed-off-by: strawberry <[email protected]>
  • Loading branch information
girlbossceo authored and zecakeh committed Apr 7, 2024
1 parent 31dc4a2 commit 047764b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/ruma-client-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Improvements:
- Add server support discovery endpoint, according to MSC1929 / Matrix 1.10
- Add `dir` `Request` field on the `get_relating_events_with_rel_types` and
`get_relating_events_with_rel_type_and_event_type` endpoints
- Add unstable support for moderator server support discovery, according to MSC4121

# 0.17.4

Expand Down Expand Up @@ -83,7 +84,7 @@ Breaking changes:

Improvements:

- Add convenience constructors for enabling lazy-loading in filters
- Add convenience constructors for enabling lazy-loading in filters
- Add support for using an existing session to log in another (MSC3882 / Matrix 1.7)
- Add support for media download redirects (MSC3860 / Matrix 1.7)
- Stabilize support for asynchronous media uploads (MSC2246 / Matrix 1.7)
Expand Down
1 change: 1 addition & 0 deletions crates/ruma-client-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ unstable-msc3488 = []
unstable-msc3575 = []
unstable-msc3814 = []
unstable-msc3983 = []
unstable-msc4121 = []

[dependencies]
as_variant = { workspace = true }
Expand Down
7 changes: 7 additions & 0 deletions crates/ruma-client-api/src/discovery/discover_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ pub enum ContactRole {
/// A role intended for sensitive requests.
Security,

/// A role for moderation-related queries according to [MSC4121](https://github.com/matrix-org/matrix-spec-proposals/pull/4121).
///
/// The future prefix for this if accepted will be `m.role.moderator`
#[cfg(feature = "unstable-msc4121")]
#[ruma_enum(rename = "support.feline.msc4121.role.moderator", alias = "m.role.moderator")]
Moderator,

#[doc(hidden)]
_Custom(PrivOwnedStr),
}
1 change: 1 addition & 0 deletions crates/ruma/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ unstable-msc3955 = ["ruma-events?/unstable-msc3955"]
unstable-msc3956 = ["ruma-events?/unstable-msc3956"]
unstable-msc3983 = ["ruma-client-api?/unstable-msc3983"]
unstable-msc4075 = ["ruma-events?/unstable-msc4075"]
unstable-msc4121 = ["ruma-client-api?/unstable-msc4121"]
unstable-pdu = ["ruma-events?/unstable-pdu"]
unstable-unspecified = [
"ruma-common/unstable-unspecified",
Expand Down

0 comments on commit 047764b

Please sign in to comment.