diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-07-05 17:13:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-05 17:13:26 +0100 |
commit | 460dccf93d5eb77db00620f0ef5a4f1a91bbe7ae (patch) | |
tree | 0b20aa9974d5572aae3ec89e125bb8ef0031cb62 /syncapi | |
parent | c0f824d4375493127799eb3c3ecf0327838813d6 (diff) |
Hopefully fix read receipts timestamps (#2557)
This should avoid coercions between signed and unsigned ints which might fix problems like `sql: converting argument $5 type: uint64 values with high bit set are not supported`.
Diffstat (limited to 'syncapi')
-rw-r--r-- | syncapi/consumers/receipts.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/syncapi/consumers/receipts.go b/syncapi/consumers/receipts.go index 6bb0747f..83156cf9 100644 --- a/syncapi/consumers/receipts.go +++ b/syncapi/consumers/receipts.go @@ -87,7 +87,7 @@ func (s *OutputReceiptEventConsumer) onMessage(ctx context.Context, msg *nats.Ms Type: msg.Header.Get("type"), } - timestamp, err := strconv.Atoi(msg.Header.Get("timestamp")) + timestamp, err := strconv.ParseUint(msg.Header.Get("timestamp"), 10, 64) if err != nil { // If the message was invalid, log it and move on to the next message in the stream log.WithError(err).Errorf("output log: message parse failure") |