问题
I want to know when bot user (belongs to my app) is added to private channel , I know member_joined_channel event will fired for all invites in the private channel but I am interested in the event only when my bot user is added to private channel and ignore other invites. Is there any way I can filter?
My app is installed in different workspaces . Bot user id of same app is different for different workspace so I cannot filter by bot user id.
回答1:
Every time your app is installed into a new workspace it will receive the new tokens along with the new bot user ID for that workspace. If you store that bot user ID you can later filter events for your bot.
Since you also get the team ID with each event you just need to match against the respective bot user ID for that team.
来源:https://stackoverflow.com/questions/57578404/how-to-filter-bot-users-belong-to-my-app-when-i-listen-to-member-joined-channel