mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
SSS: implement bump_stamp
This commit is contained in:
parent
a2bbfd1242
commit
adff2ec637
1 changed files with 12 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue