Fix names and types misrepresenting PduCount as ShortEventId.

Add get_shorteventid_from_pdu_id() conversion.

Fix prev/next nearest-state interface (dev branch 642086ecfcfa).

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-09-29 09:44:45 +00:00
parent 368ead20a6
commit e6c85c97c6
16 changed files with 157 additions and 87 deletions

View File

@@ -128,7 +128,7 @@ impl Service {
&'a self,
user_id: &'a UserId,
room_id: &'a RoomId,
shorteventid: PduCount,
count: PduCount,
_inc: &'a IncludeThreads,
) -> impl Stream<Item = Result<(PduCount, PduEvent)>> + Send {
self.services
@@ -136,7 +136,7 @@ impl Service {
.get_shortroomid(room_id)
.map_ok(move |shortroomid| PduId {
shortroomid,
shorteventid: shorteventid.saturating_sub(1),
count: count.saturating_sub(1),
})
.map_ok(Into::into)
.map_ok(move |current: RawPduId| {
@@ -162,7 +162,7 @@ impl Service {
pdu.as_mut_pdu().remove_transaction_id().ok();
}
Some((pdu_id.shorteventid, pdu))
Some((pdu_id.count, pdu))
})
.map(Ok)
})