Add ability to remove an appservice

This commit is contained in:
Torsten Flammiger 2021-12-20 15:46:36 +01:00
parent 9b57c89df6
commit 7857da8a0b
4 changed files with 30 additions and 0 deletions

View file

@ -27,6 +27,15 @@ impl Appservice {
Ok(())
}
/**
* Remove an appservice registration
* service_name is the name you send to register the service
*/
pub fn unregister_appservice(&self, service_name: &str) -> Result<()> {
self.id_appserviceregistrations.remove(service_name.as_bytes())?;
Ok(())
}
pub fn get_registration(&self, id: &str) -> Result<Option<serde_yaml::Value>> {
self.cached_registrations
.read()