Discobot 坏了?我在教程里发送了 .com 和 example.com

我发送的链接是 a.comexample.comhttps://example.comhttps://en.wikipedia.org/wiki/Exotic_Shorthair。discobot 停止回复,只在几分钟后才发送了一条“关心你”的消息(截图中未显示)。

(点击截图可查看完整对话。由于 try.discourse.org 没有 discobot 的问候功能,无法在该网站上复现此问题)

1 个赞

感谢提出这个问题。也谢谢你来查看我的 Discobot。不过现在,我更有兴趣为讨论获取新的内容。目前几乎没有可用的贡献者。

请理解,我只是在尝试开发一个论坛的想法。

我之所以在 Discourse Meta 上提出这个问题,是因为 discobot 是由 Discourse 开发人员构建的,而 Discourse Meta 正是向开发人员报告 bug 的地方,这样他们才能确认这是否真的是一个 bug 并进行修复。

因为许多其他论坛也在使用 Discourse,如果这个问题得到修复,将惠及所有这些论坛。

1 个赞

这看起来确实是个 bug。从我在代码中看到的情况来看,onebox 教程实际上只接受这 3 个特定的链接,因此它的说明完全是错误的。代码中甚至对此有所提及:

https://github.com/discourse/discourse/blob/b828735c770e5054d54f6e4d3dbf38b322c3cc84/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/new_user_narrative.rb#L270-L276

      # 注意:如果用户更改了 discourse_narrative_bot.new_user_narrative.onebox.instructions 的网站文本,
      # 或者用户粘贴了其他随机链接,这可能会变得有点脆弱,但我们目前接受这种风险。
      found_link =
        @post.raw.match(
          %r{https://en\.wikipedia\.org/wiki/(Inherently_funny_word|Death_by_coconut|Calculator_spelling)},
        )

我知道我们并没有真正计划在 Discobot 教程上投入更多精力,但这仍然让人不太舒服。我们该怎么办 @martin ?我们至少能否将 Exotic_Shorthair 链接添加到正则表达式中,以便至少让回退机制重新生效?

(不过无论如何,我会将此标记为 bug。)

同时交叉发布此帖 Discobot Links are confusing in some translations

1 个赞