Use Ruleset type from ruma_events in get_pushrules endpoints
This commit is contained in:
parent
80726d0546
commit
da4abacf69
@ -8,6 +8,8 @@ Breaking changes:
|
||||
* Update `r0::room::create_room::CreationContent`
|
||||
* Change `federated`s type from `Option<bool>` to `bool`
|
||||
* Add `predecessor` field
|
||||
* Update `r0::push::get_pushrules_all` and `r0::push::get_pushrules_global_scope` to use the
|
||||
`Ruleset` type from `ruma_events`
|
||||
|
||||
Improvements:
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
//! [GET /_matrix/client/r0/pushrules/](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-pushrules)
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
|
||||
use super::{PushRule, RuleKind};
|
||||
use ruma_events::push_rules::Ruleset;
|
||||
|
||||
ruma_api! {
|
||||
metadata {
|
||||
@ -20,7 +17,7 @@ ruma_api! {
|
||||
|
||||
response {
|
||||
/// The global ruleset
|
||||
pub global: BTreeMap<RuleKind, Vec<PushRule>>
|
||||
pub global: Ruleset,
|
||||
}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -1,10 +1,7 @@
|
||||
//! [GET /_matrix/client/r0/pushrules/global/](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-pushrules)
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
|
||||
use super::{PushRule, RuleKind};
|
||||
use ruma_events::push_rules::Ruleset;
|
||||
|
||||
ruma_api! {
|
||||
metadata {
|
||||
@ -21,7 +18,7 @@ ruma_api! {
|
||||
response {
|
||||
/// The global ruleset.
|
||||
#[ruma_api(body)]
|
||||
pub global: BTreeMap<RuleKind, Vec<PushRule>>,
|
||||
pub global: Ruleset,
|
||||
}
|
||||
|
||||
error: crate::Error
|
||||
|
Loading…
x
Reference in New Issue
Block a user