Discourse Slackdoor Plugin

DEPRECATION NOTICE

This plugin is now deprecated.

There is no plan to maintain or enhance it.


As of August 17, 2019, it still works but with limitations.

In particular:

  1. It doesn’t unfurl messages that don’t start with the link (this was always the case).
  2. It does not really do what one would expect in threads; the message is “unfurled” in the main channel.

In addition, outgoing webhooks are no longer recommended by Slack. They recommend creating a Slack App for this kind of integration now.

You may find this plugin useful as is, despite these limitations, but doing so comes with the above limitations and the risks that come with using software that is no longer maintained.

It is unclear whether there is any existing alternative to this plugin, so there is likely an opportunity for someone else to make something that solves this problem in a better way.


The discourse-slackdoor plugin allows Slack to unfurl links to your private Discourse instance.

Usage

When you post a message that starts with a link to a post or a topic in your private Discourse instance, a bot will post a message that contains the unfurled content as a reply.

Setup

  1. Configure an outgoing webhook on your Slack instance.
  2. Install and configure the discourse-slackdoor plugin.

Configure an Outgoing Webhook in Slack

Set the following values for your outgoing webhook:

  • Channels: All
  • Trigger Word(s): <https://forum.example.com/t/
  • URL: https://forum.example.com/slackdoor/knock
  • Token: (autogenerated, but copy value to add to your plugin settings)

You can also choose a name and icon for the bot’s posts.

Install and Configure Discourse-Slackdoor Plugin

  1. Install the plugin using this how to guide.
  2. Go to the Site Settings for your Discourse instance and type slackdoor into the filter to show the settings for the plugin.
    • enabled
    • token
    • username

The token should be set to the value that is generated by Slack when you create the webhook.

The username should be a user that can see topics you want to be able to share to Slack (but not topics that you don’t want to share).

Issues or Questions?

Please post any issues or questions in this topic.

13 个赞

A compatibility issue with this plugin was introduced in Discourse commit eaf87f07701b70903dcc88a7235371a00cc61083.

If you are on that version or newer of Discourse, you should update this plugin.

Discourse is creating their own officially supported Slack plugin and this is a feature on their todo list, so hopefully in the not-too-distant future this plugin will become obsolete :wink:

4 个赞

这个插件的状态如何?它还能用吗?我查看了官方 Slack 插件(已弃用)及其替代品,但似乎重点不在于支持在 Discourse 私有实例中对 URL 进行展开。

这对 @mcwumbly 还有用吗,还是已经完全过时了?

此插件现已弃用。

我无意继续维护或增强它。


它仍可运行,但存在限制。

特别是:

  1. 它不会展开那些不以链接_开头_的消息(这一直是如此)。
  2. 在线程中,它无法按预期工作;消息会在主频道中被“展开”。

此外,Slack 不再推荐使用传出 Webhook。现在,Slack 建议为此类集成创建 Slack 应用。

直到最近,我们尽管存在这些风险仍在使用此插件,但最近决定将其卸载,因为它带来的困惑多于益处。

目前,据我所知,没有其他现有集成能够为私有 Discourse 实例提供展开消息的功能,因此用户可能仍会觉得此插件有用。但使用它需承担上述限制以及使用不再维护的软件所带来的风险。

这为其他人提供了一个机会,可以开发更好的解决方案来解决这一问题。


README 以及上方的 OP/Wiki 现已相应更新。

4 个赞