Skip to content

feat(integrations): Propagate ViewerContext in MS Teams webhook#112414

Merged
gricha merged 4 commits intomasterfrom
gricha/feat/webhook-vc-msteams
Apr 10, 2026
Merged

feat(integrations): Propagate ViewerContext in MS Teams webhook#112414
gricha merged 4 commits intomasterfrom
gricha/feat/webhook-vc-msteams

Conversation

@gricha
Copy link
Copy Markdown
Member

@gricha gricha commented Apr 7, 2026

Summary

  • Wraps _handle_action_submitted (after group/integration validation, where group.organization.id is concrete) and _handle_team_member_removed (per-org loop) with webhook_viewer_context.
  • Gated behind the viewer-context.enabled option (no-op when disabled).
  • Part of the ViewerContext RFC rollout for webhook handlers.

Wrap _handle_action_submitted (after group validation) and
_handle_team_member_removed (per-org loop) with
webhook_viewer_context so downstream code has access to
the current organization identity via the ViewerContext contextvar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gricha gricha requested review from a team as code owners April 7, 2026 21:27
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 7, 2026
@gricha gricha marked this pull request as draft April 7, 2026 21:29
@gricha gricha changed the title feat(hybridcloud): Propagate ViewerContext in MS Teams webhook feat(integrations): Propagate ViewerContext in MS Teams webhook Apr 7, 2026
Verify that webhook_viewer_context sets the correct organization_id
and actor_type during both action submission and team member removal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gricha gricha marked this pull request as ready for review April 8, 2026 23:20
Fix mypy errors: add type parameters to list annotations and type
annotations to capturing wrapper functions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mypy rejects `*args: object` when the wrapped function has specific
parameter types. Switch to `Any` so the forwarding call type-checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gricha gricha merged commit dc34fcd into master Apr 10, 2026
56 checks passed
@gricha gricha deleted the gricha/feat/webhook-vc-msteams branch April 10, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants