如何在 Java 中使用 Microsoft Bot Framework 呈现降价?

How to render markdown with Microsoft Bot Framework in Java?

我在渲染降价文本时遇到问题。 它不会显示在 Skype For Business 中。什么都没有收到,但如果我不编写 setTextFormat 代码行,我会收到一个纯字符串。

Activity reply = activity.createReply("**This is a bold string**");
reply.setTextFormat(TextFormatTypes.MARKDOWN);
this.connector.getConversations()
                .sendToConversation(
                        activity.getConversation().getId(),
                        reply);

我是不是漏掉了什么?

谢谢。

编辑:与 XML 相同的问题。

Skype for Business bots are deprecated 如果你不知道:

Important

Skype for Business channel in Bot Framework is being deprecated on June 30, 2019.

No new bots will be able to add Skype for Business channel after that date. Existing bots will continue to work until October 31, 2019. Microsoft Teams is the preferred communication tool from Microsoft. Learn how to connect your bot to Microsoft Teams.

因为我无法测试你的问题,所以我无法知道 Skype for Business 是否应该支持 Markdown,尽管你可能有兴趣阅读以下内容:Can we use Markdown with Bot Framework for Skype for Business?. There may have been some way to format messages, but even if there was you should be using a different channel anyway. Even if you weren't making bots, you have less than two years left with Skype for Business 和建议大家迁移到 Teams。

如果您对 Bot Framework 有任何疑问,请提出新问题 post,我的团队很乐意为您解答。