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
pub async fn register_appservice(&self, yaml: Registration) -> Result<String> {
//TODO: Check for collisions between exclusive appservice namespaces
services()
.appservice
.registration_info
self.registration_info
.write()
.await
.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
pub async fn unregister_appservice(&self, service_name: &str) -> Result<()> {
// removes the appservice registration info
services()
.appservice
.registration_info
self.registration_info
.write()
.await
.remove(service_name)