mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Give receipts their own stream ID in the database (#1631)
* Give read recipts their own database sequence * Give receipts their own stream ID * Change migration names * Reset sequences * Add max receipt queries, missing stream_id table entry for SQLite
This commit is contained in:
parent
c55361c1b8
commit
ebcacd1bb5
9 changed files with 203 additions and 8 deletions
|
@ -483,10 +483,15 @@ func (d *Database) syncPositionTx(
|
|||
if maxPeekID > maxEventID {
|
||||
maxEventID = maxPeekID
|
||||
}
|
||||
maxReceiptID, err := d.Receipts.SelectMaxReceiptID(ctx, txn)
|
||||
if err != nil {
|
||||
return sp, err
|
||||
}
|
||||
// TODO: complete these positions
|
||||
sp = types.StreamingToken{
|
||||
PDUPosition: types.StreamPosition(maxEventID),
|
||||
TypingPosition: types.StreamPosition(d.EDUCache.GetLatestSyncPosition()),
|
||||
PDUPosition: types.StreamPosition(maxEventID),
|
||||
TypingPosition: types.StreamPosition(d.EDUCache.GetLatestSyncPosition()),
|
||||
ReceiptPosition: types.StreamPosition(maxReceiptID),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue