Skip to content

Adding ContextTeamId and ContextEnterpriseId to EventCallback, and IsEnterpriseInstall to Authorization - #272

Merged
soxtoby merged 1 commit into
soxtoby:masterfrom
we4sz:event-callback-context-ids
Nov 1, 2026
Merged

soxtoby merged 1 commit into
soxtoby:masterfrom
we4sz:event-callback-context-ids

Conversation

@we4sz

@we4sz we4sz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Three fields in the Events API payload that Slack sends with events have no property in SlackNet 0.19.0. Unlike the fields inside an event, they have nowhere to land: EventCallback and Authorization have no extension data, so a deserialized callback silently drops them. I found them comparing a real Events API delivery with EventCallback. My app doesn't read them through a workaround today. This models them. It is one commit.

  1. EventCallback.ContextTeamId (context_team_id) and ContextEnterpriseId (context_enterprise_id), next to TeamId and EnterpriseId. The reference describes the second as "The enterprise org through which your app is receiving the event (i.e., where the app is installed).", and ContextTeamId has the workspace version of that sentence.
  2. Authorization.IsEnterpriseInstall (is_enterprise_install), on each entry of authorizations. oauth.v2.access has the same flag, and its page says to look for it "to determine whether it has been installed on an entire organization or a single workspace", which is the wording I used.

Compatibility

Additive only. The new properties default to null and false.

Testing

New EventCallbackTests: a callback with both context IDs, one with a null context_enterprise_id, and authorizations with is_enterprise_install true and false. ./do test passes (786 tests).

Seen in a real response: all three are in a real Events API delivery.

Not verified: the wording. The reference describes context_enterprise_id in its field table, but shows context_team_id and is_enterprise_install only in its example payloads, so those two doc comments are my reading of them. I also haven't run my app against a local pack of this branch.

@soxtoby
soxtoby merged commit 56f4d84 into soxtoby:master Nov 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants