mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 17:53:01 +02:00
impl MSC2966: register clients dynamically
This commit is contained in:
parent
5ab7b61129
commit
eb4c6f9d13
4 changed files with 108 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue