Repository navigation
fix(msteams): send channel files to the team SharePoint site - #189339
Merged
Merged
Conversation
Resolve the actual team site through the existing guarded Graph request owner, with bounded scoped caching and standard-channel validation. Preserve explicit sites and group-chat configuration. Co-authored-by: Ahmed Tokyo <[email protected]>
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
roboclaw-bot
marked this pull request as ready for review
October 31, 2026 11:57
roboclaw-bot
enabled auto-merge (squash)
October 31, 2026 12:03
Keep the synthetic channel-send context while retaining real module exports, as required by the mock factory ratchet. Co-authored-by: Ahmed Tokyo <[email protected]>
roboclaw-bot
disabled auto-merge
October 31, 2026 12:08
Collaborator
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 1, 2026
…w#189339) * fix(msteams): send channel files to the team SharePoint site Resolve the actual team site through the existing guarded Graph request owner, with bounded scoped caching and standard-channel validation. Preserve explicit sites and group-chat configuration. Co-authored-by: Ahmed Tokyo <[email protected]> * test(msteams): preserve send context mock exports Keep the synthetic channel-send context while retaining real module exports, as required by the mock factory ratchet. Co-authored-by: Ahmed Tokyo <[email protected]> --------- Co-authored-by: Ahmed Tokyo <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #136274, thanks @a-tokyo.
Related: #136271
What Problem This Solves
Fixes: Microsoft Teams channel file sends fail without a manually configured SharePoint site, and a central configured site can leave team members unable to open the file card.
User Impact
Standard channels can send files to their own team's SharePoint site without setting
sharePointSiteId. Explicit sites keep precedence. Group chats and private/shared channels still require an explicit site; no config migration or new option is introduced.Discovery uses the existing
Sites.ReadWrite.Allapplication grant and the existingChannelSettings.Read.GroupRSC grant in the documented Teams manifest. No new permission scopes are requested. Microsoft documents these grants for site lookup and channel lookup.Why This Change Was Made
Both file-send paths now resolve the team's actual site through the existing guarded SharePoint Graph request owner. Cold references resolve the AAD group through the existing identity owner and regional SDK client. The site cache holds at most 500 account/tenant/bot/team entries; channel type is checked before using a cached parent-team site.
This is a small reimplementation of the useful fix, omitting the proposed folder option and extra Graph scope. The old require-site-only helper and its obsolete unit test are removed. Production grows by 113 lines for discovery, bounded caching, and the regional metadata operation; no equivalent dead production code was found to remove safely. Regression tests grow by 196 lines, with a matching test-line allocation for the two delivery entry points, cache isolation, cancellation, and audience/explicit-site contracts.
Evidence
447e14d02460342af4fe2c98dbd5475b15b938d2. The new regression failed in both public send entry points at the originalsharePointSiteId is requirederror before production edits.git diff --checkpassed. The initial CI run passed all behavioral, type, lint, docs, and security jobs; its baseline job found a new test mock that did not preserve exports. That test-only defect is corrected, and the exact failed mock-export check now passes locally. The corrected six-case regression passes (7.84s Vitest / 9.63s wrapper). Final-head CI run 41199827659 passed onad71ec8e5ca71ff7bd1ffbfd001fb7d1f4795b00, including the previously failing baseline checks.scoped-clean, no actionable findings, against the full local candidate based on447e14d02460342af4fe2c98dbd5475b15b938d2(committed unchanged asa1b7b58ccff0e60f0f7e44818abb1b85e14b6ac4). This was a static review, with unchanged SDK, handoff, timeout, and identity sources supplied as context. A separate P0-P3 autoreview of the export-preserving test correction and exact three-line budget increase also completed scoped-clean; production is byte-identical in correction ad71ec8.gh pr view/gh pr diffand was never checked out or executed. Production Gateway/state was untouched.Human contributor credit on the commit:
Co-authored-by: Ahmed Tokyo <[email protected]>.