Microsoft Teams Bot 在频道上发送图像

Microsoft Teams Bot Send Images on Channel

我正在尝试在 Teams 上构建一个机器人,它会收到一张图片并给出一定的回复。

我可以在 1:1 聊天中按预期使用该机器人,但在团队频道中它无法将图像识别为消息的一部分。

  protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
    {
        bool messageWithFileDownloadInfo = turnContext.Activity.Attachments?[0].ContentType == FileDownloadInfo.ContentType;
        if (messageWithFileDownloadInfo)
        {
            var file = turnContext.Activity.Attachments[0];

从频道接收消息时的内容类型始终只是 plain/text。

有什么想法是否支持在频道中通过引用传递图像?如果是这样,我做错了什么?

此致

目前仅在个人范围(1:1 聊天)中支持与 bot 的文件共享,但在频道和群聊中不支持。

这里是documentation link