Hint at thread replies when messages are unthreaded (slack) (#684)

This commit is contained in:
Wim
2019-02-10 17:23:50 +01:00
committed by GitHub
parent 2cfd880cdb
commit 57f156be83
3 changed files with 19 additions and 0 deletions

View File

@@ -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
}