summaryrefslogtreecommitdiffstats
path: root/bridge/slack/helpers.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-02-10 17:23:50 +0100
committerGitHub <noreply@github.com>2019-02-10 17:23:50 +0100
commit57f156be8328529666aadaee780711f12b6e162b (patch)
tree312da5daceb4f622abb15eaaba505416600f4ae3 /bridge/slack/helpers.go
parent2cfd880cdb0df29771bf8f31df8d990ab897889d (diff)
downloadmatterbridge-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 'bridge/slack/helpers.go')
-rw-r--r--bridge/slack/helpers.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/bridge/slack/helpers.go b/bridge/slack/helpers.go
index 9959d4fa..4d191c0d 100644
--- a/bridge/slack/helpers.go
+++ b/bridge/slack/helpers.go
@@ -254,6 +254,13 @@ func (b *Bslack) populateReceivedMessage(ev *slack.MessageEvent) (*config.Messag
}
}
+ // For edits, only submessage has thread ts.
+ // Ensures edits to threaded messages maintain their prefix hint on the
+ // unthreaded end.
+ if ev.SubMessage != nil {
+ rmsg.ParentID = ev.SubMessage.ThreadTimestamp
+ }
+
if err = b.populateMessageWithUserInfo(ev, rmsg); err != nil {
return nil, err
}