From a9d8ac8bc0c745d43440aa56f1b602edf8e4aef7 Mon Sep 17 00:00:00 2001 From: Qais Patankar Date: Thu, 31 Dec 2020 18:01:57 +0000 Subject: Refactor "msg-parent-not-found" to config.ParentIDNotFound (#1347) --- bridge/discord/discord.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bridge/discord') diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index daeaa403..184dde85 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -243,7 +243,7 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) { } // Handle prefix hint for unthreaded messages. - if msg.ParentID == "msg-parent-not-found" { + if msg.ParentNotFound() { msg.ParentID = "" msg.Text = fmt.Sprintf("[thread]: %s", msg.Text) } @@ -297,7 +297,7 @@ func (b *Bdiscord) handleEventBotUser(msg *config.Message, channelID string) (st Content: msg.Username + msg.Text, } - if msg.ParentID != "" && msg.ParentID != "msg-parent-not-found" { + if msg.ParentValid() { m.Reference = &discordgo.MessageReference{ MessageID: msg.ParentID, ChannelID: channelID, -- cgit v1.2.3