diff options
author | Kegsay <kegan@matrix.org> | 2020-07-29 19:00:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 19:00:04 +0100 |
commit | 0fdd4f14d123e76bd3d0368947d3aab84a787946 (patch) | |
tree | 024b7d526095bfe2a64d46d1eba4ca4e0c3b388b /syncapi/storage/shared | |
parent | 9a5fb489c5f80148a8512e61c95c8df7bb46d314 (diff) |
Add support for logs in StreamingToken (#1229)
* Add support for logs in StreamingToken
Tokens now end up looking like `s11_22|dl-0-123|ab-0-12224`
where `dl` and `ab` are log names, `0` is the partition and
`123` and `12224` are the offsets.
* Also test reserialisation
* s/|/./g so tokens url escape nicely
Diffstat (limited to 'syncapi/storage/shared')
-rw-r--r-- | syncapi/storage/shared/syncserver.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/syncapi/storage/shared/syncserver.go b/syncapi/storage/shared/syncserver.go index e1312671..dd5b838c 100644 --- a/syncapi/storage/shared/syncserver.go +++ b/syncapi/storage/shared/syncserver.go @@ -434,7 +434,7 @@ func (d *Database) syncPositionTx( if maxInviteID > maxEventID { maxEventID = maxInviteID } - sp = types.NewStreamToken(types.StreamPosition(maxEventID), types.StreamPosition(d.EDUCache.GetLatestSyncPosition())) + sp = types.NewStreamToken(types.StreamPosition(maxEventID), types.StreamPosition(d.EDUCache.GetLatestSyncPosition()), nil) return } @@ -731,7 +731,7 @@ func (d *Database) CompleteSync( // Use a zero value SyncPosition for fromPos so all EDU states are added. err = d.addEDUDeltaToResponse( - types.NewStreamToken(0, 0), toPos, joinedRoomIDs, res, + types.NewStreamToken(0, 0, nil), toPos, joinedRoomIDs, res, ) if err != nil { return nil, err |