处理Microsoft Bot Framework上的邮件附件

时间:2017-10-25 08:47:10

标签: c# bots botframework attachment

我试图处理有附件的邮件,即时通讯 远程服务器返回错误:(400)错误请求。错误。我怎么能以正确的方式处理这个问题?

MessageController

        if (activity.Type == ActivityTypes.Message)
        {
            try
            {
                ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl));
                // Check in QnA Dialog
                await Conversation.SendAsync(activity, () => new QnADialog());
            }
            catch (Exception ex)
            {

                throw;
            }

        }
        else
        {
            HandleSystemMessage(activity);
        }
        var response = Request.CreateResponse(HttpStatusCode.OK);
        return response;

1 个答案:

答案 0 :(得分:2)

您可以直接检查D9D04D51-EF4A-4745-492A-D1341C3F0636对象上的附件计数,并执行以下操作:

activity