refactor(appservices): avoid cloning frequently

This commit is contained in:
Matthias Ahouansou 2024-03-22 18:27:14 +00:00
parent 5c650bb67e
commit b20483aa13
No known key found for this signature in database
7 changed files with 44 additions and 40 deletions

View file

@ -100,7 +100,7 @@ pub(crate) async fn get_alias_helper(
match services().rooms.alias.resolve_local_alias(&room_alias)? {
Some(r) => room_id = Some(r),
None => {
for appservice in services().appservice.all().await {
for appservice in services().appservice.read().await.values() {
if appservice.aliases.is_match(room_alias.as_str())
&& if let Some(opt_result) = services()
.sending