diff --git a/crates/ruma-client-api/src/push.rs b/crates/ruma-client-api/src/push.rs index de17b615..a07fb5b1 100644 --- a/crates/ruma-client-api/src/push.rs +++ b/crates/ruma-client-api/src/push.rs @@ -1,6 +1,7 @@ //! Endpoints for push notifications. use std::{error::Error, fmt}; +pub use ruma_common::push::RuleKind; use ruma_common::{ push::{ Action, ConditionalPushRule, ConditionalPushRuleInit, HttpPusherData, PatternedPushRule, @@ -165,31 +166,6 @@ impl TryFrom for ConditionalPushRule { } } -/// The kinds of push rules that are available. -#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))] -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, StringEnum)] -#[ruma_enum(rename_all = "snake_case")] -#[non_exhaustive] -pub enum RuleKind { - /// User-configured rules that override all other kinds. - Override, - - /// Lowest priority user-defined rules. - Underride, - - /// Sender-specific rules. - Sender, - - /// Room-specific rules. - Room, - - /// Content-specific rules. - Content, - - #[doc(hidden)] - _Custom(PrivOwnedStr), -} - /// Which kind a pusher is, and the information for that kind. #[derive(Clone, Debug)] #[non_exhaustive] diff --git a/crates/ruma-common/src/push.rs b/crates/ruma-common/src/push.rs index 77f6d710..19bea914 100644 --- a/crates/ruma-common/src/push.rs +++ b/crates/ruma-common/src/push.rs @@ -458,6 +458,31 @@ pub enum PushFormat { _Custom(PrivOwnedStr), } +/// The kinds of push rules that are available. +#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))] +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, StringEnum)] +#[ruma_enum(rename_all = "snake_case")] +#[non_exhaustive] +pub enum RuleKind { + /// User-configured rules that override all other kinds. + Override, + + /// Lowest priority user-defined rules. + Underride, + + /// Sender-specific rules. + Sender, + + /// Room-specific rules. + Room, + + /// Content-specific rules. + Content, + + #[doc(hidden)] + _Custom(PrivOwnedStr), +} + #[cfg(test)] mod tests { use std::collections::BTreeMap;