summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-04-19 23:31:45 +0200
committerWim <wim@42.be>2019-04-19 23:31:45 +0200
commitfed77cccf3ca8104c60ffedbff130a1e520abfb7 (patch)
treedf2e09f5319109d2ea8b18291b3fe8370f52fd73 /bridge
parent9b520dfb782c65ff0ab95712eaee4e7487e9729b (diff)
downloadmatterbridge-msglm-fed77cccf3ca8104c60ffedbff130a1e520abfb7.tar.gz
matterbridge-msglm-fed77cccf3ca8104c60ffedbff130a1e520abfb7.tar.bz2
matterbridge-msglm-fed77cccf3ca8104c60ffedbff130a1e520abfb7.zip
Handle unthreaded messages (mattermost). Fixes #803
Diffstat (limited to 'bridge')
-rw-r--r--bridge/mattermost/mattermost.go6
1 files changed, 6 insertions, 0 deletions
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) {