Explorar o código

Double check bridging status before handling message

Some webhook messages don't seem to have the guild ID specified
Tulir Asokan %!s(int64=2) %!d(string=hai) anos
pai
achega
7cdd1bb9e4
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      user.go

+ 4 - 0
user.go

@@ -879,6 +879,10 @@ func (user *User) pushPortalMessage(msg interface{}, typeName, channelID, guildI
 		}
 		portal = thread.Parent
 	}
+	// Double check because some messages don't have the guild ID specified.
+	if !user.bridgeMessage(portal.GuildID) {
+		return
+	}
 
 	portal.discordMessages <- portalDiscordMessage{
 		msg:    msg,