bolt-js: Message event payloads missing `team_id` in enterprise on mobile slack clients

When I type anything in my workspace app from mobile Slack the event that I get the team_id is missing from the event payload but when I type from web/desktop Slack I receive the team_id in the event payload. It used to work on mobile as well 2-3 months back but I don’t know what happened suddenly it stopped working. Can anyone please help as it’s a blocker for me?

Reproducible in:

The Slack SDK version:

"slack/events-api": "^2.3.4",
"slack/interactive-messages": "^1.7.1",
"slack/oauth": "^1.4.0",
"slack/logger": "^2.0.0",
"slack/types": "^1.10.0",
"slack/web-api": "^5.15.0",

Node version: 14.21.3

Steps to reproduce:

  1. Create any app in the enterprise grid.
  2. type any message and check the event
  3. The team_id will be missing from it.

Expected result:

We should receive the team_id on the event triggered from the mobile

{ "client_msg_id": "6c564b51-3312-4b83-93cc-7b14e7896bad", "type": "message", "text": "hi", "user": "<user_id>", "ts": "1707921031.568219", "blocks": [ { "type": "rich_text", "block_id": "a8bcU", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "hi" } ] } ] } ], "team": "<team_id>", "user_team": "<user_id>", "source_team": "<team_id>", "user_profile": { "avatar_hash": "ba68d4f1c35f", "image_72": "https://avatars.slack-edge.com/2022-12-06/4469061237205_ba68d4f1c35f2da9553f_72.jpg", "first_name": "<firstName>", "real_name": <real_name>", "display_name": "<name>", "team": "<team_id>", "name": "<name>", "is_restricted": false, "is_ultra_restricted": false }, "channel": "<channelId>", "event_ts": "<event_id>", "channel_type": "im" }

Actual result:

the event from mobile slack { "client_msg_id": "0637d92d-1484-4a3e-a0c5-3967ad0a27b5", "type": "message", "text": "Hii", "user": "<user_id>", "blocks": [ { "type": "rich_text", "block_id": "NsxuO", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Hii" } ] } ] } ], "channel": "<channelId>", "event_ts": "<event_id>", "channel_type": "im" }

Questions:

  1. Why does it only fail in an enterprise grid but not in a non-enterprise grid?
  2. Do I need to upgrade the SDK, if yes will existing things break?

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 16 (6 by maintainers)

Most upvoted comments

This also seems to prevent the user_profile from being included in messages from mobile, which means an extra users.info call is required to get things like “the display name of the message author”.

Hi @srajiang, yes we’re still facing the issue. Do we need to change the Slack SDK version (the existing versions are mentioned in this ticket)? Do you need to remove the app and then add it again?