From 70655246ac29cfea8256a47415c33564dda2ccfd Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Thu, 12 Dec 2019 12:37:38 +0800 Subject: [PATCH] modules/starboard: Fix duplicate starring in message Starboard is not meant to star a message multiple times. After investigation, it has been noted that the check if a message has been starred does not check the same ID as the one recorded. To rectify this, the recorded ID is now the message that got starred instead of the one sent to starboard. --- modules/starboard/starboard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/starboard/starboard.go b/modules/starboard/starboard.go index 733c118..49af631 100644 --- a/modules/starboard/starboard.go +++ b/modules/starboard/starboard.go @@ -102,7 +102,7 @@ func ReactListener(s *discordgo.Session, m *discordgo.MessageReactionAdd) { log.Error(s, "listenToStarboardReact", "messageReactionAdd", err) return } - err = db.SetStarred(msg.ID) + err = db.SetStarred(m.MessageID) if err != nil { log.Error(s, err) return