Microsoft Bot Framework Bot duplicate responses in Slack

时间秒杀一切 提交于 2019-12-11 15:26:54

问题


I have a simple code to test bot responses in my RoodDialog.cs code:

    if (activity.Text.Trim().ToLower() == "--hi")
    {
        IMessageActivity replyMessage = context.MakeMessage();
        replyMessage.Text = $"Hello {activity.From.Name}";
        await context.PostAsync(replyMessage);
    }

Works as expected in Skype, Emulator and Facebook Messenger, however sends duplicate response messages ("Hello {Name}") in Slack.

I think its either Slack configuration or a Bot Framework issue. Anyone seen and resolved this?

Thanks


回答1:


Thanks to some Howdy developers I found the issue.

It happens when the bot has already been authorized to the team, and then someone else comes in and authorizes the bot again. When that happens, it seems there are two bots running that then use the same RTM connection to post to the channel twice.

I don't know how I got 2 bots in same Slack client. but once I removed and reinstalled my bot it started working as expected.

Same issue is causing this other symptom: Microsoft Bot Framework IDialogContext.Call() not working when using Slack



来源:https://stackoverflow.com/questions/46165894/microsoft-bot-framework-bot-duplicate-responses-in-slack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!