slackapi / slackapi/bolt-js

Message event payloads missing `team_id` in enterprise on mobile slack clients

Open
#2,062 16 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triage-skip bug server-side-issue
Dominant language
TypeScript
Stars
2.9k
Forks
445
Avg merge
1d 3h
Merged PRs (30d)
28

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is identified. Start with the reported mobile and desktop event payloads and the enterprise-grid reproduction, then determine whether the missing team_id originates in Slack or SDK handling. Done means documenting the cause and a confirmed compatible resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.