Increment by number of read receipts

This commit is contained in:
Neil Alexander 2020-12-11 14:15:45 +00:00
parent 0eb3bece77
commit db9c5ef07f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -629,6 +629,7 @@ func (d *Database) addReceiptDeltaToResponse(
} }
read.User[receipt.UserID] = eduAPI.ReceiptTS{TS: receipt.Timestamp} read.User[receipt.UserID] = eduAPI.ReceiptTS{TS: receipt.Timestamp}
content[receipt.EventID] = read content[receipt.EventID] = read
res.NextBatch.ReceiptPosition++
} }
ev.Content, err = json.Marshal(content) ev.Content, err = json.Marshal(content)
if err != nil { if err != nil {
@ -636,7 +637,6 @@ func (d *Database) addReceiptDeltaToResponse(
} }
jr.Ephemeral.Events = append(jr.Ephemeral.Events, ev) jr.Ephemeral.Events = append(jr.Ephemeral.Events, ev)
res.NextBatch.ReceiptPosition++
res.Rooms.Join[roomID] = jr res.Rooms.Join[roomID] = jr
} }