Apply suggestions from code review

Co-authored-by: David Robertson <davidr@element.io>
This commit is contained in:
kegsay 2023-06-05 13:49:42 +01:00 committed by GitHub
parent 38f9cd0de8
commit 8f2e0697f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ func (t *ReceiptTable) SelectReceiptsForEvents(roomID string, eventIDs []string)
return
}
// Select all (including private) receipts for this user in this room.
// Select all (including private) receipts for this user in these rooms.
func (t *ReceiptTable) SelectReceiptsForUser(roomIDs []string, userID string) (receiptsByRoom map[string][]internal.Receipt, err error) {
var receipts []internal.Receipt
err = t.db.Select(&receipts, `SELECT room_id, event_id, user_id, ts, thread_id FROM syncv3_receipts

View File

@ -118,7 +118,7 @@ func (r *ReceiptsRequest) ProcessInitial(ctx context.Context, res *Response, ext
if len(receipts) == 0 {
continue
}
rooms[roomID], _ = state.PackReceiptsIntoEDU(append(receipts, receipts...))
rooms[roomID], _ = state.PackReceiptsIntoEDU(receipts)
}
if len(rooms) > 0 {