Microsoft Teams中的ActionTypes.MessageBack是否有问题? [英] Issue with ActionTypes.MessageBack in Microsoft Teams?

查看:187
本文介绍了Microsoft Teams中的ActionTypes.MessageBack是否有问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Bot Builder的3.11版本与C#一起使用.我有一个具有以下属性的类型为ActionTypes.MessageBack的操作按钮.

cardActions.Add(new CardAction()
{
    Type = ActionTypes.MessageBack,
    Title = "Update Est. Close Date",
    Value = JsonConvert.SerializeObject(data),
    Text = "Update Est. Close Date"
});

当我单击按钮时,机器人会在Microsoft Teams桌面versoin中用更新按钮"文本回显.但是,iOS中的Microsoft Team并非如此.这是Microsoft Teams中MessageBack操作类型的问题吗?请帮忙.

如果在用户单击更新估计关闭日期"时看到以下内容,则在PC的Microsoft Teams应用程序中,但在iOS中,我看到了从Bot到用户的相同文本的回显.

解决方案

messageBack按钮具有此处未使用的其他属性-displayText.这就是在聊天/频道中回显给用户的内容,以使他们知道该按钮已被按下.有关更多信息,请参见此处. >

我认为您发现Web/桌面和iOS客户端在displayText属性不存在时会发生什么变化,但是messageBack绝对适用于所有Teams客户端

I am using 3.11 version of Bot Builder with C#. I have an action button of type ActionTypes.MessageBack with below attributes.

cardActions.Add(new CardAction()
{
    Type = ActionTypes.MessageBack,
    Title = "Update Est. Close Date",
    Value = JsonConvert.SerializeObject(data),
    Text = "Update Est. Close Date"
});

When i click on the button, bot echoes back with "Update button" text in Microsoft Teams desktop versoin. But that is not the case for Microsoft Team in iOS. Is this an issue with MessageBack action type in Microsoft Teams? Please help.

If you see below when user clicks on "Update Est. Close Date", i see an echo of the same text from Bot to User, in Microsoft Teams application in PC, but not in iOS.

解决方案

A messageBack button has an additional property that you're not using here - displayText. That is what's echoed back to the user in the chat/channel to let them know that the button was pressed. See here for more information.

I think you've found a small difference in the web/desktop and iOS clients with respect to what happens if the displayText property is not present, but messageBack definitely works on all Teams clients.

这篇关于Microsoft Teams中的ActionTypes.MessageBack是否有问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆