Add TagEvent type alias
This commit is contained in:
parent
7491b33e81
commit
47a4dc51c6
@ -9,6 +9,7 @@ event_enum! {
|
|||||||
"m.ignored_user_list",
|
"m.ignored_user_list",
|
||||||
"m.push_rules",
|
"m.push_rules",
|
||||||
"m.room_key",
|
"m.room_key",
|
||||||
|
"m.tag",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
src/tag.rs
18
src/tag.rs
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
use ruma_events_macros::ruma_event;
|
use crate::BasicEvent;
|
||||||
|
use ruma_events_macros::BasicEventContent;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
ruma_event! {
|
/// Informs the client of tags on a room.
|
||||||
/// Informs the client of tags on a room.
|
pub type TagEvent = BasicEvent<TagEventContent>;
|
||||||
TagEvent {
|
|
||||||
kind: Event,
|
/// The payload for `TagEvent`.
|
||||||
event_type: "m.tag",
|
#[derive(Clone, Debug, Deserialize, Serialize, BasicEventContent)]
|
||||||
content: {
|
#[ruma_event(type = "m.tag")]
|
||||||
|
pub struct TagEventContent {
|
||||||
/// A map of tag names to tag info.
|
/// A map of tag names to tag info.
|
||||||
pub tags: BTreeMap<String, TagInfo>,
|
pub tags: BTreeMap<String, TagInfo>,
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Information about a tag.
|
/// Information about a tag.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user