mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 04:09:24 +00:00
Refactor "msg-parent-not-found" to config.ParentIDNotFound (#1347)
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user