microsoft / microsoft/teams.net

Link unfurling fails because of missing conversationType

Open
#158 2 comments 0 reactions 0 assignees View on GitHub

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:

Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.