Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 9a44bb38f86fb932bd532e347bc6b4f7828dbd55 Author: Wim <wim@42.be> Date: Fri Apr 19 23:31:45 2019 +0000 Handle unthreaded messages (mattermost). Fixes #803 diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index ce4f4c3..e41b19d 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -1216 +12112 @@ 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) {