Skip to content

[Bug]: StreamingChannelData not serializing feedbackLoopType correctly #2427

@JGemkow

Description

@JGemkow

Language

C#

Version

latest

Description

Setting feedbackLoopType to "custom" on a StreamingChannelData object included as ChannelData in a message Activity response from the bot does not properly enable Teams to be able to fetch a custom feedback form when clicking the feedback buttons.

This appears to be related to an issue with how the feedbackLoopType is serialized to the channelData property within the JSON. Currently, feedbackLoopType is included as a property of channelData when serialized. However, according to some docs, the bot framework API seems to expect this to be set like the following within the channelData property:

  {
      "feedbackLoop": {
          "type": "custom"
      }
  }

Per #2387 , it sounds like this is a bug.

Reproduction Steps

Working example using TeamsChannelData instead of StreamingChannelData:

    activity.ChannelData = new TeamsChannelData()
    {
        AdditionalProperties = new Dictionary<string, object>()
        {
            ["streamSequence"] = 2,
            ["streamType"] = "final",
            ["feedbackLoop"] = new Dictionary<string, object>
            {
                { "type", "custom" }
            }
        }
    };

    await turnContext.SendActivityAsync(activity, cancel);

Expected to work, but not working:

    activity.ChannelData = new StreamingChannelData()
    {
        StreamSequence = 2,
        StreamType = StreamType.Final,
        feedbackLoopType = "custom"
    };

    await turnContext.SendActivityAsync(activity, cancel);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdotnetChange/fix applies to dotnet. If all three, use the 'JS & dotnet & Python' label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions