Services refactor

Replace structs of Dep<Service> with OnceServices, so each service has a Services reference

Remove service name => Service map

Flatten Services.rooms

Make reqwest Clients lazy initialized (client service)
This commit is contained in:
dasha_uwu committed 2025-08-28 23:15:59 +05:00
1 parent 26b3a84b88
commit b5890b9664
118 files changed
+457 -1923

No files matched your search

-3
View File
@@ -57,13 +57,11 @@ pub(crate) async fn search_users_route(
}
let user_in_public_room = services
.rooms
.state_cache
.rooms_joined(&user_id)
.map(ToOwned::to_owned)
.broad_any(async |room_id| {
services
.rooms
.state_accessor
.get_join_rules(&room_id)
.map(|rule| matches!(rule, JoinRule::Public))
@@ -71,7 +69,6 @@ pub(crate) async fn search_users_route(
});
let user_sees_user = services
.rooms
.state_cache
.user_sees_user(sender_user, &user_id);