diff options
author | Wim <wim@42.be> | 2019-02-10 17:23:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-10 17:23:50 +0100 |
commit | 57f156be8328529666aadaee780711f12b6e162b (patch) | |
tree | 312da5daceb4f622abb15eaaba505416600f4ae3 /gateway | |
parent | 2cfd880cdb0df29771bf8f31df8d990ab897889d (diff) | |
download | matterbridge-msglm-57f156be8328529666aadaee780711f12b6e162b.tar.gz matterbridge-msglm-57f156be8328529666aadaee780711f12b6e162b.tar.bz2 matterbridge-msglm-57f156be8328529666aadaee780711f12b6e162b.zip |
Hint at thread replies when messages are unthreaded (slack) (#684)
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/gateway.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 6fe19963..72d0831b 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -398,6 +398,12 @@ func (gw *Gateway) SendMessage(origmsg config.Message, dest *bridge.Bridge, chan msg.ParentID = canonicalParentMsgID } + // if the parentID is still empty and we have a parentID set in the original message + // this means that we didn't find it in the cache so set it "msg-parent-not-found" + if msg.ParentID == "" && origmsg.ParentID != "" { + msg.ParentID = "msg-parent-not-found" + } + // if we are using mattermost plugin account, send messages to MattermostPlugin channel // that can be picked up by the mattermost matterbridge plugin if dest.Account == "mattermost.plugin" { |