microsoft / microsoft/teams.py
[Bug]: File share links not present in MessageActivity
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 65
- Forks
- 30
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 23
Description
### Bug Description
When the user attaches a file in teams - in the 1:1 chat with the Teams app - and that file is from some file share (SharePoint or OneDrive; like the file suggestions when clicking on the clip in Teams) and not a file from the local computer, there is nothing whatsoever in the MessageActivity context present. Not in ctx.attachment or otherwise. Therefore, these attachments are completely invisible to the Teams app. For local files all works as expected.
### Steps to Reproduce
1. Set up a message input hook
2. Attach a file from a file share like OneDrive or SharePoint that Teams probably automatically sends more as reference than as a file I'd assume
3. Check ctx.attachment and see there is nothing but the text message the user put in along with the attachment
### Expected Behavior
The attached file is present in ctx.attachment like with locally uploaded files.
### Actual Behavior
No trace of any attachment is present whatsoever.
### SDK Version
2.0.13.4
### Python Version
3.14.6
### Additional Context
The environment is an business setup with SSO for SharePoint, OneDrive, Teams etc and is connected together - in case that changes things.
If you need debug logs or something - feel free to let me know and how to get the information you need.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the message input hook and inspect how MessageActivity populates ctx.attachment for locally uploaded files versus SharePoint or OneDrive references. Reproduce the issue with a shared file and verify that the attachment is available in ctx.attachment like a local file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100