microsoft / microsoft/teams.net
Link unfurling fails because of missing conversationType
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 46
- Forks
- 21
- Avg merge
- 22h 25m
- Merged PRs (30d)
- 16
Description
I implemented the link unfurling example code in my project.
This works for unfurling links pasted in chats, but when I call the sharing feature from @microsoft/teams-js it breaks.
sharing.shareWebContent({
content: [{
url: sharingUrl,
type: 'URL',
message: `Take a look at this item`,
preview: true,
}]
});
This should show a unfurled preview like so:
But that doesn't work because in the request payload sent to the bot the Conversation.ConversationType is missing.
But in a chat the ConversationType is "groupChat" and it works.
JSON deserialization for type 'Microsoft.Teams.Api.Conversation' was missing required properties including: 'conversationType'.
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 by reproducing the sharing.shareWebContent request and inspect the bot payload's Microsoft.Teams.Api.Conversation deserialization. Compare it with the working chat payload, focusing on the missing ConversationType property. Done means shared links produce an unfurled preview without the required-property deserialization error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100