From 6a3d163bdd1dad7e5fd0692f5d6fbd2bbc4e93d2 Mon Sep 17 00:00:00 2001 From: Jono Wenger <jono@elixxir.io> Date: Tue, 19 Oct 2021 11:19:19 -0700 Subject: [PATCH] Fix group bindings timestamp MS functions --- Makefile | 4 ++-- bindings/group.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 25edc0f05..d8cbcd4df 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ update_release: GOFLAGS="" go get gitlab.com/xx_network/primitives@release GOFLAGS="" go get gitlab.com/elixxir/primitives@release GOFLAGS="" go get gitlab.com/xx_network/crypto@release - GOFLAGS="" go get gitlab.com/elixxir/crypto@release + GOFLAGS="" go get gitlab.com/elixxir/crypto@bob/FileTransfer GOFLAGS="" go get gitlab.com/xx_network/comms@release GOFLAGS="" go get gitlab.com/elixxir/comms@release @@ -34,4 +34,4 @@ update_master: master: update_master clean build version -release: update_release clean build version +release: update_release clean build diff --git a/bindings/group.go b/bindings/group.go index 2df75cdd1..8d20c533d 100644 --- a/bindings/group.go +++ b/bindings/group.go @@ -13,6 +13,7 @@ import ( gs "gitlab.com/elixxir/client/groupChat/groupStore" "gitlab.com/elixxir/crypto/group" "gitlab.com/xx_network/primitives/id" + "time" ) // GroupChat object contains the group chat manager. @@ -291,7 +292,7 @@ func (gmr *GroupMessageReceive) GetTimestampNano() int64 { // GetTimestampMS returns the message timestamp in milliseconds. func (gmr *GroupMessageReceive) GetTimestampMS() int64 { - return gmr.Timestamp.UnixNano() / 1_000_000 + return gmr.Timestamp.UnixNano() / int64(time.Millisecond) } // GetRoundID returns the ID of the round the message was sent on. @@ -308,5 +309,5 @@ func (gmr *GroupMessageReceive) GetRoundTimestampNano() int64 { // GetRoundTimestampMS returns the timestamp, in milliseconds, of the round the // message was sent on. func (gmr *GroupMessageReceive) GetRoundTimestampMS() int64 { - return gmr.RoundTimestamp.UnixNano() / 1_000_000 + return gmr.RoundTimestamp.UnixNano() / int64(time.Millisecond) } -- GitLab