move typing feature up one level out of rooms.edus.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-03-31 17:14:31 -07:00 committed by June
parent 89a919ce75
commit 9790477b0e
8 changed files with 10 additions and 20 deletions

View file

@ -73,11 +73,6 @@ impl Services<'_> {
presence: rooms::edus::presence::Service {
db,
},
typing: rooms::edus::typing::Service {
typing: RwLock::new(BTreeMap::new()),
last_typing_update: RwLock::new(BTreeMap::new()),
typing_update_sender: broadcast::channel(100).0,
},
},
event_handler: rooms::event_handler::Service,
lazy_loading: rooms::lazy_loading::Service {
@ -130,6 +125,11 @@ impl Services<'_> {
threads: rooms::threads::Service {
db,
},
typing: rooms::typing::Service {
typing: RwLock::new(BTreeMap::new()),
last_typing_update: RwLock::new(BTreeMap::new()),
typing_update_sender: broadcast::channel(100).0,
},
spaces: rooms::spaces::Service {
roomid_spacehierarchy_cache: Mutex::new(LruCache::new(
(100.0 * config.conduit_cache_capacity_modifier) as usize,

View file

@ -1,9 +1,7 @@
pub mod presence;
pub mod typing;
pub trait Data: presence::Data + 'static {}
pub struct Service {
pub presence: presence::Service,
pub typing: typing::Service,
}

View file

@ -17,6 +17,7 @@ pub mod state_cache;
pub mod state_compressor;
pub mod threads;
pub mod timeline;
pub mod typing;
pub mod user;
pub trait Data:
@ -60,6 +61,7 @@ pub struct Service {
pub state_compressor: state_compressor::Service,
pub timeline: timeline::Service,
pub threads: threads::Service,
pub typing: typing::Service,
pub spaces: spaces::Service,
pub user: user::Service,
}