add events and rooms migrations
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-07-24 23:08:02 +02:00
parent 9510d9c765
commit d98e9ea9e3
17 changed files with 324 additions and 315 deletions

20
neo-util/src/events.rs Normal file
View 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
}
}

View File

@@ -1 +1,2 @@
pub mod events;
pub mod password;