Reputation: 43
Private messages or Direct messages can be found with methods such as im.history
and converstation.history
.
How to find thread message? I want to find thread messages and delete them.
Upvotes: 3
Views: 2314
Reputation: 32698
Finding thread messages
You need to use the conversations.history
method to retrieve the parent message of a thread.
And then the conversations.replies
method to retrieve the thread including all thread messages for a parent message.
You can detect a parent message by looking on the ts
and thread_ts
properties:
When a message has a thread_ts value and it matches the same message's ts, the message is a thread parent.
For more information check out the official documentation: Finding message threads in the wild
Deleting thread messages
You can delete a thread message the same way as with normal message using the chat.delete
method.
Upvotes: 3