mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
Correctly generate backpagination tokens for events which have the same depth (#996)
* Correctly generate backpagination tokens for events which have the same depth With tests. Unfortunately the code around here is hard to understand. There will be a subsequent PR which fixes this up now that we have a test harness in place. * Add postgres impl * More linting * Fix psql statement so it actually works
This commit is contained in:
parent
e15f6676ac
commit
b28674435e
10 changed files with 238 additions and 80 deletions
|
@ -64,8 +64,14 @@ const (
|
|||
// /sync or /messages, for example.
|
||||
type PaginationToken struct {
|
||||
//Position StreamPosition
|
||||
Type PaginationTokenType
|
||||
PDUPosition StreamPosition
|
||||
Type PaginationTokenType
|
||||
// For /sync, this is the PDU position. For /messages, this is the topological position (depth).
|
||||
// TODO: Given how different the positions are depending on the token type, they should probably be renamed
|
||||
// or use different structs altogether.
|
||||
PDUPosition StreamPosition
|
||||
// For /sync, this is the EDU position. For /messages, this is the stream (PDU) position.
|
||||
// TODO: Given how different the positions are depending on the token type, they should probably be renamed
|
||||
// or use different structs altogether.
|
||||
EDUTypingPosition StreamPosition
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue