Add TagEvent type alias
This commit is contained in:
parent
7491b33e81
commit
47a4dc51c6
@ -9,6 +9,7 @@ event_enum! {
|
||||
"m.ignored_user_list",
|
||||
"m.push_rules",
|
||||
"m.room_key",
|
||||
"m.tag",
|
||||
]
|
||||
}
|
||||
|
||||
|
18
src/tag.rs
18
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: {
|
||||
/// Informs the client of tags on a room.
|
||||
pub type TagEvent = BasicEvent<TagEventContent>;
|
||||
|
||||
/// 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<String, TagInfo>,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Information about a tag.
|
||||
|
Loading…
x
Reference in New Issue
Block a user