diff options
Diffstat (limited to 'bridge/discord/handlers.go')
-rw-r--r-- | bridge/discord/handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bridge/discord/handlers.go b/bridge/discord/handlers.go index d2b38538..81a0e11c 100644 --- a/bridge/discord/handlers.go +++ b/bridge/discord/handlers.go @@ -127,9 +127,9 @@ func (b *Bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat // Replace emotes rmsg.Text = replaceEmotes(rmsg.Text) - // Add our parent id if it exists - if m.MessageReference != nil { - rmsg.ParentID = m.MessageReference.MessageID + // Add our parent id if it exists, and if it's not referring to a message in another channel + if ref := m.MessageReference; ref != nil && ref.ChannelID == m.ChannelID { + rmsg.ParentID = ref.MessageID } b.Log.Debugf("<= Sending message from %s on %s to gateway", m.Author.Username, b.Account) |