User bumpStamp if it is present

dbkr/sss
Kegan Dougal 2024-09-17 12:11:25 +01:00
parent 0b142b496d
commit 7621fe2682
1 changed files with 6 additions and 0 deletions

View File

@ -69,6 +69,12 @@ const getLastTs = (r: Room, userId: string): number => {
if (!r?.timeline) {
return Number.MAX_SAFE_INTEGER;
}
// MSC4186: Simplified Sliding Sync sets this.
// If it's present, sort by it.
const bumpStamp = r.getBumpStamp();
if (bumpStamp) {
return bumpStamp;
}
// If the room hasn't been joined yet, it probably won't have a timeline to
// parse. We'll still fall back to the timeline if this fails, but chances