slack-ruby-bot icon indicating copy to clipboard operation
slack-ruby-bot copied to clipboard

Replying in thread to my own message

Open davich opened this issue 6 years ago • 4 comments

I'm writing a command and I want to client.say something then reply to that in a thread with more details. At the moment, I have no way of getting the data.ts or data.thread_ts that I need to make a threaded message. client.say just returns true/false.

Thanks

davich avatar Apr 08 '19 00:04 davich

I would appreciate a PR that changes this, please.

dblock avatar Apr 08 '19 02:04 dblock

From a quick look, it appears that the information isn't returned by slack-ruby-client. But I'm no expert. Any suggestions for where this info would be? Thanks

davich avatar Apr 08 '19 21:04 davich

That's where any fix should go and that's where I would look.

dblock avatar Apr 10 '19 03:04 dblock

Just want to highlight a workaround in the mean time:

last_message = client.web_client.conversations_history(channel: data.channel, limit: 1).messages.first
say(channel: data.channel, text: '...', thread_ts: last_message.ts)

jillguyonnet avatar Oct 22 '19 14:10 jillguyonnet