0

I'm trying to write a small coffeescript for hubot that gets the first message in a thread and posts it to an external script. I can get the flow id and user id info from the msg object but can't seem to find any object that contains the thread info (messages inside & thread id). How can I get that?

Thanks.

Andrei
  • 13
  • 5

1 Answers1

0

Chat messages and messages that are created through the messages API have a thread_id and the thread's messages can be retrieved from /flows/:organization/:flow/threads/:thread_id/messages

However Flowdock has older type of messages, that are still created by integrations using the deprecated push API. These messages don't have a thread specified. Instead the comments to those messages are retrieved by finding messages with the tag influx:{message_id} e.g. /flows/:organization/:flow/messages?tags=influx:123456

However this older type of threading will not be supported in the future and all messages will have a thread_id.

RedBulli
  • 46
  • 1