【发布时间】:2020-02-25 20:29:42
【问题描述】:
我在 Microsoft Teams 中的 Bot 在下面的代码中提到了主动消息背后的频道。在上周,它已停止工作。是否对 API 进行了任何更改以防止这种情况发生?
var bot = new ChannelAccount(team.BotId);
string replyText = $"<at>@{teamName}</at> ";
Logger.LogInformation($"ReplyText:{replyText}");
var activity = MessageFactory.Text(replyText);
var mentioned = JObject.FromObject(new
{
id = team.TeamId,
name = teamName
});
var mentionedEntity = new Entity("mention")
{
Properties = JObject.FromObject(new { mentioned = mentioned, text = replyText }),
};
// activity.Entities = new[] { mentionedEntity };
activity.Text = "It's time for the daily challenge " + replyText;
var convParams = new ConversationParameters()
{
TenantId = team.TenantId,
Bot = bot,
IsGroup = true,
ChannelData = team.ChannelData,
Activity = activity
};
【问题讨论】:
标签: botframework microsoft-teams