Issue with ActionTypes.MessageBack in Microsoft Teams?

旧巷老猫 提交于 2019-12-11 02:14:32

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/47152726/issue-with-actiontypes-messageback-in-microsoft-teams

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