Skip to content
Snippets Groups Projects
Commit 74334208 authored by Jono Wenger's avatar Jono Wenger
Browse files

Add timestamp MS functions to group chat bindings

parent ba6fc42d
Branches
Tags
1 merge request!53Release
......@@ -289,6 +289,11 @@ func (gmr *GroupMessageReceive) GetTimestampNano() int64 {
return gmr.Timestamp.UnixNano()
}
// GetTimestampMS returns the message timestamp in milliseconds.
func (gmr *GroupMessageReceive) GetTimestampMS() int64 {
return gmr.Timestamp.UnixNano() / 1_000_000
}
// GetRoundID returns the ID of the round the message was sent on.
func (gmr *GroupMessageReceive) GetRoundID() int64 {
return int64(gmr.RoundID)
......@@ -299,3 +304,9 @@ func (gmr *GroupMessageReceive) GetRoundID() int64 {
func (gmr *GroupMessageReceive) GetRoundTimestampNano() int64 {
return gmr.RoundTimestamp.UnixNano()
}
// 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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment