aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-03-01 16:59:11 +0000
committerGitHub <noreply@github.com>2022-03-01 16:59:11 +0000
commit726529fe996519c93f4f329c03a968a432b0bb0e (patch)
treea4b0c624a5586f83bd2f4613c3142e18b44b998e /syncapi/storage/postgres
parentcda2452ba00afffa9a73870ca09047ce52dd28c7 (diff)
Hopefully fix read receipts (#2241)
Diffstat (limited to 'syncapi/storage/postgres')
-rw-r--r--syncapi/storage/postgres/receipt_table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/syncapi/storage/postgres/receipt_table.go b/syncapi/storage/postgres/receipt_table.go
index f93081e1..474d0c02 100644
--- a/syncapi/storage/postgres/receipt_table.go
+++ b/syncapi/storage/postgres/receipt_table.go
@@ -96,7 +96,7 @@ func (r *receiptStatements) UpsertReceipt(ctx context.Context, txn *sql.Tx, room
}
func (r *receiptStatements) SelectRoomReceiptsAfter(ctx context.Context, roomIDs []string, streamPos types.StreamPosition) (types.StreamPosition, []api.OutputReceiptEvent, error) {
- lastPos := streamPos
+ var lastPos types.StreamPosition
rows, err := r.selectRoomReceipts.QueryContext(ctx, pq.Array(roomIDs), streamPos)
if err != nil {
return 0, nil, fmt.Errorf("unable to query room receipts: %w", err)