Handle unthreaded messages (mattermost). Fixes #803

This commit is contained in:
Wim 2019-04-19 23:31:45 +02:00
parent 9b520dfb78
commit fed77cccf3
1 changed files with 6 additions and 0 deletions

View File

@ -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) {