使用 chat integration 插件设置 Zulip 通知

howto 描述了如何设置包含在 discourse-chat-integration 中的 Zulip 提供方。

设置 Zulip

  1. 在您的 Zulip 个人设置中,转到 Bots(机器人)

  2. 点击 Add a new bot(添加新机器人)

  3. 输入一个名称,并将 bot type(机器人类型)选为 Incoming webhook(传入 webhook)

  4. 点击 Add(添加)

  5. 记下 API 密钥和电子邮件地址,稍后您会用到它们

设置 Discourse

  1. 在您的 Discourse 站点设置中,在 chat_integration_zulip_server 设置中输入您的 Zulip 服务器地址。请确保包含协议。(例如 https://chat.zulip.org

  2. 将您之前复制的 API 密钥粘贴到 chat_integration_zulip_bot_api_key 站点设置中

  3. 将您之前复制的电子邮件地址粘贴到 chat_integration_zulip_bot_email_address 站点设置中

  4. 启用 chat_integration_zulip_enabled

  5. 转到 Plugins(插件)选项卡,然后是 Chat Integration(聊天集成)

  6. 转到 Zulip 选项卡,然后是 Add Channel(添加频道)

  7. 输入您想要发送通知的 Stream(流),以及附加到消息的 Subject(主题)

  8. Save Channel(保存频道)

  9. 使用您刚刚创建的频道的 Test(测试)按钮来检查一切是否正常工作。您应该会看到类似以下的内容:

  10. 根据 discourse-chat-integration 的说明,为您的频道设置一些“规则”。

10 个赞

Would it be possible to have the discourse server be set to an entire stream on zulip, with a zulip topic matching a discourse category/topic and allowing posting back to Discourse messages to the appropriate zulip topic as either the zulip user themselves (if matching email address) or optionally as the bot user itself (would prefer using a matching discourse user by email, I use oidc for everything so it is all unified anyway, falling back to just posting as the bot itself with an appropriate ‘who said it’). It would be amazingly userful to respond to discourse threads while using the zulip-term terminal interface without needing to spool up a web browser (especially since I don’t have a GUI at times, only a pure console interface).

EDIT1: Also, are there any issues with this and running Zulip 2.0+?

EDIT2: Matching the user from discourse to zulip via email address would be possible as well, but it would need to become a System Bot in Zulip instead of just a General Bot as would be required to post messages back to Discourse, in terms of permissions needed (System bots are ‘above’ admin). Might be a useful optional ability though.

1 个赞