我的Bot Skype没有在群组中回应

时间:2018-07-17 17:39:56

标签: bots skype-bots

我在私人消息中为Skype创建了Bot,他可以正常使用,但在组中却没有响应。

查看我的代码:

[BotAuthentication]
public class MessagesController : ApiController
{
    /// <summary>
    /// POST: api/Messages
    /// receive a message from a user and send replies
    /// </summary>
    /// <param name="activity"></param>
    [ResponseType(typeof(void))]
    public virtual async Task<HttpResponseMessage> Post([FromBody] Activity activity)
    {
        // check if activity is of type message
        if (activity != null && activity.GetActivityType() == ActivityTypes.Message)
        {
            ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl));
            Random random = new Random();

            string resposta = string.Empty;
            if (activity.Text.ToLower().StartsWith("guid"))
                resposta = Guid.NewGuid().ToString();
            else if (activity.Text.ToLower().StartsWith("empty"))
                resposta = Guid.Empty.ToString();

            // return our reply to the user
            if (!string.IsNullOrEmpty(resposta))
            {
                Activity reply = activity.CreateReply(resposta);
                await connector.Conversations.ReplyToActivityAsync(reply);
            }
        }
        else
        {
            HandleSystemMessage(activity);
        }
        return new HttpResponseMessage(System.Net.HttpStatusCode.Accepted);
    }
}

我活跃在Azure中的组中 active in group for skype

但是他在我的频道配置中的状态为“ inReview”。

怎么了?

0 个答案:

没有答案