mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
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:
1 parent
26b3a84b88
commit
b5890b9664
118 files changed
+457
-1923
No files matched your search
@@ -32,13 +32,11 @@ pub(crate) async fn get_threads_route(
|
||||
.unwrap_or_else(PduCount::max);
|
||||
|
||||
let threads: Vec<(PduCount, PduEvent)> = services
|
||||
.rooms
|
||||
.threads
|
||||
.threads_until(body.sender_user(), &body.room_id, from, &body.include)
|
||||
.take(limit)
|
||||
.try_filter_map(async |(count, pdu)| {
|
||||
Ok(services
|
||||
.rooms
|
||||
.state_accessor
|
||||
.user_can_see_event(body.sender_user(), &body.room_id, &pdu.event_id)
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user