Slack API message.im event is not triggered for other users

我的梦境 提交于 2020-03-16 07:41:28

问题


I am trying to make my app watch for every kind of messages (public/private channels and direct messages) using event subscriptions, no bot. I made my app subscribe to message.channels, message.groups, message.im and message.mpim events.

I've setup an endpoint URL with the challenge parameter, and I've authorized and deployed my app. I'm successfully notified when :

  • A message is posted in a public channel
  • A message is posted in a private channel (even if my personal account is not invited in)
  • A direct message to/from my personal account

But, I'm not notified when there is a direct message posted between two other people.

How can it be related to my personal account as I've installed the app on the whole workspace ?


回答1:


It is not supposed to work. Even if you subscribe to "Workspace Events" you should only be able to see messages of conversations that the user that installed the Slack app is invited in. Including private channels and IM.

I just tested this on my Slack. Installed the Slack app with an owner user, but still can only see messages from private channels, that that user is a member of.

So this works "as designed" and according to the security architecture of Slack.



来源:https://stackoverflow.com/questions/49282271/slack-api-message-im-event-is-not-triggered-for-other-users

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!