impl MSC2966: register clients dynamically

This commit is contained in:
lafleur 2025-04-16 21:17:36 +02:00 committed by nexy7574
commit eb4c6f9d13
No known key found for this signature in database
GPG key ID: 0FA334385D0B689F
4 changed files with 108 additions and 0 deletions

View file

@ -45,6 +45,16 @@ impl crate::Service for Service {
}
impl Service {
pub fn register_client(&self, client: &Client) -> Result<()> {
self
.registrar
.lock()
.expect("lockable registrar")
.register_client(client.clone());
Ok(())
}
pub fn preconfigured() -> Self {
Service {
registrar: Mutex::new(