diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index ce4f4c33..e41b19d7 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -121,6 +121,12 @@ func (b *Bmattermost) Send(msg config.Message) (string, error) { return msg.ID, b.mc.DeleteMessage(msg.ID) } + // Handle prefix hint for unthreaded messages. + if msg.ParentID == "msg-parent-not-found" { + msg.ParentID = "" + msg.Text = fmt.Sprintf("[thread]: %s", msg.Text) + } + // Upload a file if it exists if msg.Extra != nil { for _, rmsg := range helper.HandleExtra(&msg, b.General) {