Browse Source

Double check bridging status before handling message

Some webhook messages don't seem to have the guild ID specified
Tulir Asokan 2 years ago
parent
commit
7cdd1bb9e4
1 changed files with 4 additions and 0 deletions
  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,