Slack斜杠命令response_type ephemeral被发送到整个通道

时间:2016-04-22 04:53:56

标签: slack-api slack

短暂消息应该只对发出命令的用户可见。但是,根据我的经验,它被发送到整个频道。

我错过了什么吗?

enter image description here

enter image description here

根据Slack Slash commands documentation,唯一需要的属性是在Node.js app的响应中将response_type设置为ephemeral。

我的应用中的代码如下所示:

  var t = {
    "response_type": "ephemeral",
    "text": "How to use /please"
  }
    request({
    uri: uri,
    headers: {
      'content-type': 'application/json',
    },
    method: 'POST',
    body: JSON.stringify(t)
  }, function (error, response, body) {

    return res.status(200).end();
  });

1 个答案:

答案 0 :(得分:4)

目前只在斜杠命令中支持临时消息。从您的屏幕捕获看起来您将有效负载发送到传入的webhook。不幸的是,我找不到支持这个的维基,但是这是另一个有类似答案的帖子:Slack API "attachments" not showing