aboutsummaryrefslogtreecommitdiff
path: root/federationapi/consumers
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-07-05 17:13:26 +0100
committerGitHub <noreply@github.com>2022-07-05 17:13:26 +0100
commit460dccf93d5eb77db00620f0ef5a4f1a91bbe7ae (patch)
tree0b20aa9974d5572aae3ec89e125bb8ef0031cb62 /federationapi/consumers
parentc0f824d4375493127799eb3c3ecf0327838813d6 (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 'federationapi/consumers')
-rw-r--r--federationapi/consumers/receipts.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/federationapi/consumers/receipts.go b/federationapi/consumers/receipts.go
index 9300451e..2c9d79bc 100644
--- a/federationapi/consumers/receipts.go
+++ b/federationapi/consumers/receipts.go
@@ -90,7 +90,7 @@ func (t *OutputReceiptConsumer) onMessage(ctx context.Context, msg *nats.Msg) bo
return true
}
- 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("EDU output log: message parse failure")