summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost/mattermost.go
diff options
context:
space:
mode:
authorPatrick Connolly <patrick.c.connolly@gmail.com>2019-01-09 15:50:03 -0500
committerWim <wim@42.be>2019-01-09 21:50:03 +0100
commitb33b50987b89676a5fb71476639d488e051315d8 (patch)
tree44e57e49a9fc7d37b4ca99e8b889e1db041725bc /bridge/mattermost/mattermost.go
parent5193634a5210857e1fe49fc1c2d4297912794935 (diff)
downloadmatterbridge-msglm-b33b50987b89676a5fb71476639d488e051315d8.tar.gz
matterbridge-msglm-b33b50987b89676a5fb71476639d488e051315d8.tar.bz2
matterbridge-msglm-b33b50987b89676a5fb71476639d488e051315d8.zip
Add support for mattermost threading (#627)
Diffstat (limited to 'bridge/mattermost/mattermost.go')
-rw-r--r--bridge/mattermost/mattermost.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index b0dca0ba..ce4f4c33 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -124,7 +124,7 @@ func (b *Bmattermost) Send(msg config.Message) (string, error) {
// Upload a file if it exists
if msg.Extra != nil {
for _, rmsg := range helper.HandleExtra(&msg, b.General) {
- if _, err := b.mc.PostMessage(b.mc.GetChannelId(rmsg.Channel, b.TeamID), rmsg.Username+rmsg.Text); err != nil {
+ if _, err := b.mc.PostMessage(b.mc.GetChannelId(rmsg.Channel, b.TeamID), rmsg.Username+rmsg.Text, msg.ParentID); err != nil {
b.Log.Errorf("PostMessage failed: %s", err)
}
}
@@ -144,5 +144,5 @@ func (b *Bmattermost) Send(msg config.Message) (string, error) {
}
// Post normal message
- return b.mc.PostMessage(b.mc.GetChannelId(msg.Channel, b.TeamID), msg.Text)
+ return b.mc.PostMessage(b.mc.GetChannelId(msg.Channel, b.TeamID), msg.Text, msg.ParentID)
}