slackapi / slack-api-specs

Open API specifications for platform products by Slack
MIT License
222 stars 64 forks source link

Get all the messages with replies #56

Open vaibhavkhurana2018 opened 3 years ago

vaibhavkhurana2018 commented 3 years ago

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

Requirements (place an x in each of the [ ])


Currently conversation.replies method gives the list of all the replies for a given ts. But there is no way to identify or get the list of messages which have been responded.

The only way to do this at the moment is to get all the parent messages from the conversations.history method and then loop through those messages and call conversation.replies api to check if they have a reply or not. Now following this will mean that we will have to make an api call for every message, which will result in a lot of api calls.

Use case:

We need to get all the messages that someone has responded back in the last X hours.

Possible solution:

stevengill commented 3 years ago

Hey @vaibhavkhurana2018

Are you talking about thread replies?

vaibhavkhurana2018 commented 3 years ago

Hey @stevengill

yes i am referring to thread replies.

vaibhavkhurana2018 commented 3 years ago

Use Case:

Now for getting all the threads on this we have to make multiple api calls as from what i was able to find, that the conversation.replies only takes a single ts, if that can be taken as a list then also it will help to reduce the network api calls.

vaibhavkhurana2018 commented 3 years ago

@stevengill By any chance you got the time to have a look at the above.

I have added redis as the caching mechanism for the use case tog reduce the number of calls on the api, but this still doesn't solve the purpose as with the increase in number of messages i am still reaching to a point where i am being rate limited by the api.