我想通过 Slack API 在 Slack 线程中回复。
我有一个对象。
var msg = {
text: 'test',
thread_ts: '1513168789.000263' // it's right ts, I have checked
}
我提出请求
request.post({
method: 'post',
body: msg,
json: true,
url: '<incoming slack webhook>'
})
我希望在线程中回复消息,但它只是发布在 channel 中。
最佳答案
您需要使用chat.postMessage
如果您想向线程发送消息。传入的 webhook 将无法工作(或者至少文档中没有任何信息表明它会支持它)。
chat.postMessage
有一个名为 thread_ts
的属性,您可以使用它来寻址正确的线程。
另请参阅this answer关于网络钩子(Hook)和线程。
关于json - 无法在 Slack 线程中回复使用 JSON 发出 http post 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47793802/