diff --git a/src/enums.rs b/src/enums.rs index 1cec0491..fb7916fe 100644 --- a/src/enums.rs +++ b/src/enums.rs @@ -9,6 +9,7 @@ event_enum! { "m.ignored_user_list", "m.push_rules", "m.room_key", + "m.tag", ] } diff --git a/src/tag.rs b/src/tag.rs index 45e8781b..ffe91e29 100644 --- a/src/tag.rs +++ b/src/tag.rs @@ -2,19 +2,19 @@ use std::collections::BTreeMap; -use ruma_events_macros::ruma_event; +use crate::BasicEvent; +use ruma_events_macros::BasicEventContent; use serde::{Deserialize, Serialize}; -ruma_event! { - /// Informs the client of tags on a room. - TagEvent { - kind: Event, - event_type: "m.tag", - content: { - /// A map of tag names to tag info. - pub tags: BTreeMap, - }, - } +/// Informs the client of tags on a room. +pub type TagEvent = BasicEvent; + +/// The payload for `TagEvent`. +#[derive(Clone, Debug, Deserialize, Serialize, BasicEventContent)] +#[ruma_event(type = "m.tag")] +pub struct TagEventContent { + /// A map of tag names to tag info. + pub tags: BTreeMap, } /// Information about a tag.