refactor a ton of the admin room code (50% done)
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
6b28bd5ae7
commit
0cf368a327
20 changed files with 1002 additions and 935 deletions
|
@ -44,11 +44,11 @@ pub(crate) enum QueryCommand {
|
|||
/// Processes admin query commands
|
||||
#[allow(non_snake_case)]
|
||||
pub(crate) async fn process(command: QueryCommand, _body: Vec<&str>) -> Result<RoomMessageEventContent> {
|
||||
match command {
|
||||
QueryCommand::AccountData(AccountData) => account_data(AccountData).await,
|
||||
QueryCommand::Appservice(Appservice) => appservice(Appservice).await,
|
||||
QueryCommand::Presence(Presence) => presence(Presence).await,
|
||||
QueryCommand::RoomAlias(RoomAlias) => room_alias(RoomAlias).await,
|
||||
QueryCommand::Globals(Globals) => globals(Globals).await,
|
||||
}
|
||||
Ok(match command {
|
||||
QueryCommand::AccountData(AccountData) => account_data(AccountData).await?,
|
||||
QueryCommand::Appservice(Appservice) => appservice(Appservice).await?,
|
||||
QueryCommand::Presence(Presence) => presence(Presence).await?,
|
||||
QueryCommand::RoomAlias(RoomAlias) => room_alias(RoomAlias).await?,
|
||||
QueryCommand::Globals(Globals) => globals(Globals).await?,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue