SSS: implement bump_stamp

This commit is contained in:
Lambda 2025-05-20 17:44:56 +00:00
parent a2bbfd1242
commit adff2ec637

View file

@ -832,6 +832,17 @@ fn process_room(
(todo_room.roomsince != 0).then(|| todo_room.roomsince.to_string())
});
// TODO: consider only message-like PDUs here, rather than all PDUs
let bump_stamp = match services()
.rooms
.timeline
.last_timeline_count(sender_user, room_id)?
{
PduCount::Backfilled(n) | PduCount::Normal(n) => {
Some(UInt::new_saturating(n))
}
};
let room_events: Vec<_> =
timeline_pdus.iter().map(|(_, pdu)| pdu.to_sync_room_event()).collect();
@ -1009,8 +1020,7 @@ fn process_room(
),
// Count events in timeline greater than global sync counter
num_live: None,
// TODO
bump_stamp: None,
bump_stamp,
heroes,
};
trace!(?room, "Built room data");