ChannelAccount cannot accept extensible properties
limamicro opened this issue · 0 comments
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:
To Reproduce
Steps to reproduce the behavior:
- 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'
}
}
]
}); - However, during the serializer process, it removes all the optional properties (type in this case) which is not defined in Mappers.
- 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
Additional context
Add any other context about the problem here.