driver-slack
driver-slack copied to clipboard
Always reply in existing threads
In my opinion there is no reason for the bot to be replying to a message sent in a thread directly in the channel. replyInThread() is not adequate because it always creates a new thread if there isn't one already (plus it is annoying to use in conjunction with other drivers that don't have that function).
Keeping things simple, set the thread when building the payload for the reply. If using replyInThread(). This also reverts https://github.com/botman/botman/pull/328 since the thread ID will be overridden in buildServicePayload() if it already exists anyway.
Applying unrelated StyleCI diff in the same commit.