Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChannelAccount cannot accept extensible properties #4584

Closed
limamicro opened this issue Dec 14, 2023 · 0 comments · Fixed by #4618
Closed

ChannelAccount cannot accept extensible properties #4584

limamicro opened this issue Dec 14, 2023 · 0 comments · Fixed by #4618
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior.

Comments

@limamicro
Copy link

limamicro commented Dec 14, 2023

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Versions

What package version of the SDK are you using. 4.21.3
What nodejs version are you using 8.19.4
What browser version are you using Teams T1
What os are you using Windows

Describe the bug

In ChannelAccount class, it should have an extensible property, so that it can accept optional properties which is not defined in class.
For example, in C#, we have properties act as JsonExtensionData.
C# wiki link: ChannelAccount Class (Microsoft.Bot.Schema) | Microsoft Learn
Right now in JS, there is no existing way to accept optional properties.
JS wiki link: https://learn.microsoft.com/en-us/javascript/api/botframework-schema/channelaccount?view=botbuilder-ts-latest
JS SDK ChannelAccount class link:

export interface ChannelAccount {

To Reproduce

Steps to reproduce the behavior:

  1. When bot trying to send a text message with tag mention, developer uses the below code:
    await context.sendActivity({
    text: 'Test Tag',
    entities: [
    {
    type: 'mention',
    text: 'Test Tag',
    mentioned: {
    id: tagId,
    name: 'Test Tag',
    type: 'tag'
    }
    }
    ]
    });
  2. However, during the serializer process, it removes all the optional properties (type in this case) which is not defined in Mappers.
  3. Then in the client side, the tag mention can not be detected correctly, and it shows as pure text message instead.

Expected behavior

The client should receive a bot message with tag mention enabled.

Screenshots

image
image

Additional context

Add any other context about the problem here.

@limamicro limamicro added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Dec 14, 2023
@tracyboehrer tracyboehrer removed the needs-triage The issue has just been created and it has not been reviewed by the team. label Jan 26, 2024
tracyboehrer pushed a commit that referenced this issue Feb 13, 2024
* include optional properties in channelAccount

* use object type for properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants