fix(appservices): don't panic on empty registration url

perf(appservices): cache regex for namespaces
This commit is contained in:
Matthias Ahouansou 2023-12-27 13:22:21 +00:00
parent a095e02d04
commit fa930182ae
No known key found for this signature in database
15 changed files with 335 additions and 244 deletions

View file

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