appservices: remove unnecessary `services()` call for `self`

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-06-05 02:09:31 -04:00
parent 0857fe7907
commit 38238c309f
1 changed files with 2 additions and 6 deletions

View File

@ -140,9 +140,7 @@ impl Service {
/// Registers an appservice and returns the ID to the caller /// Registers an appservice and returns the ID to the caller
pub async fn register_appservice(&self, yaml: Registration) -> Result<String> { pub async fn register_appservice(&self, yaml: Registration) -> Result<String> {
//TODO: Check for collisions between exclusive appservice namespaces //TODO: Check for collisions between exclusive appservice namespaces
services() self.registration_info
.appservice
.registration_info
.write() .write()
.await .await
.insert(yaml.id.clone(), yaml.clone().try_into()?); .insert(yaml.id.clone(), yaml.clone().try_into()?);
@ -157,9 +155,7 @@ impl Service {
/// * `service_name` - the name you send to register the service previously /// * `service_name` - the name you send to register the service previously
pub async fn unregister_appservice(&self, service_name: &str) -> Result<()> { pub async fn unregister_appservice(&self, service_name: &str) -> Result<()> {
// removes the appservice registration info // removes the appservice registration info
services() self.registration_info
.appservice
.registration_info
.write() .write()
.await .await
.remove(service_name) .remove(service_name)