refactor: minor appservice code cleanup

This commit is contained in:
Timo Kösters 2024-03-22 08:52:39 +01:00
parent fa930182ae
commit 0bb28f60cf
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB
8 changed files with 136 additions and 163 deletions

View file

@ -4,7 +4,7 @@ use std::{
};
use lru_cache::LruCache;
use tokio::sync::{Mutex, RwLock};
use tokio::sync::Mutex;
use crate::{Config, Result};
@ -56,10 +56,7 @@ impl Services {
config: Config,
) -> Result<Self> {
Ok(Self {
appservice: appservice::Service {
db,
registration_info: RwLock::new(HashMap::new()),
},
appservice: appservice::Service::build(db)?,
pusher: pusher::Service { db },
rooms: rooms::Service {
alias: rooms::alias::Service { db },