services(pdu_metadata): use self instead of services()

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-06-07 03:49:01 -04:00
parent 3ed561cb31
commit 0ebabba971

View file

@ -73,11 +73,7 @@ impl Service {
match dir { match dir {
Direction::Forward => { Direction::Forward => {
let relations_until = let relations_until = &self.relations_until(sender_user, room_id, target, from, depth)?;
&services()
.rooms
.pdu_metadata
.relations_until(sender_user, room_id, target, from, depth)?;
let events_after: Vec<_> = relations_until // TODO: should be relations_after let events_after: Vec<_> = relations_until // TODO: should be relations_after
.iter() .iter()
.filter(|(_, pdu)| { .filter(|(_, pdu)| {
@ -123,11 +119,7 @@ impl Service {
}) })
}, },
Direction::Backward => { Direction::Backward => {
let relations_until = let relations_until = &self.relations_until(sender_user, room_id, target, from, depth)?;
&services()
.rooms
.pdu_metadata
.relations_until(sender_user, room_id, target, from, depth)?;
let events_before: Vec<_> = relations_until let events_before: Vec<_> = relations_until
.iter() .iter()
.filter(|(_, pdu)| { .filter(|(_, pdu)| {