How to mention a user/group in a new message to a channel?

陌路散爱 提交于 2019-12-18 17:26:17

问题


I checked the samples/API references here:

  • https://msdn.microsoft.com/en-us/microsoft-teams/connectors
  • https://dev.outlook.com/Connectors/GetStarted
  • https://dev.outlook.com/Connectors/Reference

But cannot find how to mention someone in a new message to a channel.


回答1:


Programmatic @mentions are not currently supported by Microsoft Teams, and will probably not come soon.

There is such a wish from the community in the MS uservoice portal, but it seems not to burn as much as other issues:




回答2:


Sorry this was never answered. This feature was added months ago - there are SDK methods called addMentionToText (Node.js) and AddMentionToText (C#) - source and usage samples here.

There's also an example here that's actually a bit more helpful. That example bot can be run very quickly on Glitch - repo and instructions are here.

Note that one of the challenges in using this API is that you have to have the user ID of the person you want to @ mention, and for that you need the team roster. Examples of how to do that are here.



来源:https://stackoverflow.com/questions/41440803/how-to-mention-a-user-group-in-a-new-message-to-a-channel

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