add events and rooms migrations
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
20
neo-util/src/events.rs
Normal file
20
neo-util/src/events.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
pub static STATE_EVENTS: &[&str] = &[
|
||||
"m.room.create",
|
||||
"m.room.canonical_alias",
|
||||
"m.room.join_rules",
|
||||
"m.room.member",
|
||||
"m.room.power_levels",
|
||||
];
|
||||
|
||||
pub enum EventCategory {
|
||||
StateEvent,
|
||||
MessageEvent,
|
||||
}
|
||||
|
||||
pub fn classify_event(event_type: &str) -> EventCategory {
|
||||
if STATE_EVENTS.contains(&event_type) {
|
||||
EventCategory::StateEvent
|
||||
} else {
|
||||
EventCategory::MessageEvent
|
||||
}
|
||||
}
|
@@ -1 +1,2 @@
|
||||
pub mod events;
|
||||
pub mod password;
|
||||
|
Reference in New Issue
Block a user