From e51bcca5bac5f44912d6d77be8086263e185616a Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 17 Oct 2019 21:47:43 -0400 Subject: [PATCH] Attempt to make the getID func more 32-bit friendly --- chat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chat.go b/chat.go index b0a0317..73fa993 100644 --- a/chat.go +++ b/chat.go @@ -13,7 +13,7 @@ import ( // Returns a string representation of a message id suitable for use in a // pagination struct -func getID(id int) string { +func getID(id uint) string { var b []byte switch { case id < 128: @@ -289,7 +289,7 @@ func (c Chat) ReadMessage(messageID int) (*ChatAPI, error) { m.Params.Options.Channel = &c.Channel m.Params.Options.Pagination.Num = 1 - m.Params.Options.Pagination.Previous = getID(messageID - 1) + m.Params.Options.Pagination.Previous = getID(uint(messageID - 1)) r, err := chatAPIOut(c.keybase, m) if err != nil {