问题描述
我有一个具有 chat:write
和 chat:write.customize
权限的 "new" slack 应用。
用户编写一个斜杠命令,该命令以包含按钮的 an interactive block 进行响应,当用户单击按钮时,交互有效负载将通过 response_url
发送到服务器。
据我所知read in the docs,发布到该 response_url
应该支持 standard message payloads 现在使用 username
、icon_url
或 icon_emoji
设置发布用户的身份。
但是,以下代码仍然以机器人名称发布响应,这似乎与文档相矛盾。
postReply(user) {
return {
response_type: 'in_channel',replace_original: false,username: "my_username",icon_url: "http://urltomy.com/image.png",blocks: [
{
type: 'section',text: {
type: 'plain_text',text: 'This is a simple test',emoji: true,},}
],}
},
使用交互 API,如何代表用户发布消息?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)