fix(msteams): pass teamId into inbound route resolution#39352
fix(msteams): pass teamId into inbound route resolution#39352hddevteam wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes a missing Changes:
Confidence Score: 5/5
Last reviewed commit: c017acb |
There was a problem hiding this comment.
Pull request overview
Fixes MSTeams inbound routing for channel messages by ensuring the extracted teamId is forwarded into the shared routing layer, enabling team-scoped bindings to match as intended (instead of falling back to the default agent).
Changes:
- Forward
teamIdintocore.channel.routing.resolveAgentRoute()in the MSTeams inbound message handler. - Add a regression test asserting
teamIdis passed for channel messages withchannelData.team.id.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| extensions/msteams/src/monitor-handler/message-handler.ts | Passes teamId into route resolution so team-scoped bindings can match for channel messages. |
| extensions/msteams/src/monitor-handler/message-handler.authz.test.ts | Adds a regression test validating teamId is included in route resolution inputs for channel messages. |
c017acb to
2eb03ac
Compare
CI status noteThe currently failing CI jobs are unrelated to this PR's changes:
The jobs directly relevant to this fix all pass:
I'll re-sync once the upstream format issue is resolved. |
0e05dcc to
84808ed
Compare
The Teams message handler already reads the incoming teamId and the routing layer already supports team-scoped bindings, but the handler did not forward teamId into resolveAgentRoute(). That caused channel messages to fall back to the default agent instead of matching configured team/channel bindings.\n\nThis change forwards teamId during inbound route resolution and adds a regression test that asserts channel messages pass teamId into the routing call.
84808ed to
5812719
Compare
|
Hi @hddevteam — thanks for the submission. I’m the new Microsoft Teams maintainer for OpenClaw. Please give me a day or two to work through the open Teams backlog. Also, join the Twitter community for daily MS Teams feedback + updates: https://x.com/i/communities/2031170403607974228 |
|
Superseded by #50214. |
Summary
teamIdinto MSTeams inboundresolveAgentRoute()callsRoot cause
The MSTeams inbound handler already reads
activity.channelData?.team?.id, and the shared routing layer already supportsteamId-scoped bindings.However, the handler did not forward
teamIdwhen callingresolveAgentRoute(). That caused channel messages to fall back to the default agent instead of matching configured team/channel bindings.This looks like an implementation bug rather than an intentional product restriction because:
teamIdbinding.teampathteamIdelsewhereteamIdrestores the expected routing behavior without changing the routing modelValidation
teamIdinto route resolutionpnpm test:extensions -- --run extensions/msteams/src/monitor-handler/message-handler.authz.test.ts261 passed, includingextensions/msteams/src/monitor-handler/message-handler.authz.test.tsImpact
This fixes MSTeams channel routing for deployments that rely on team-scoped bindings, so channel messages can resolve to the intended isolated agent instead of dropping back to the default agent.