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 (устаревший) и его замену, но, похоже, фокус не на том, чтобы разрешить unfurling URL в частных экземплярах Discourse.

Это ещё актуально, @mcwumbly, или уже полностью устарело?

Этот плагин больше не поддерживается.

Я не планирую его обновлять или улучшать.


Он всё ещё работает, но с ограничениями.

В частности:

  1. Он не разворачивает сообщения, которые не начинаются со ссылки (это было всегда).
  2. В потоках он не работает так, как вы ожидаете: сообщение «разворачивается» в основном канале.

Кроме того, Slack больше не рекомендует использовать исходящие вебхуки. Теперь для подобных интеграций рекомендуется создавать приложение Slack.

До недавнего времени мы использовали этот плагин, несмотря на эти риски, но недавно решили удалить его, так как он вызывал больше путаницы, чем приносил пользы.

На данный момент мне неизвестно о других существующих интеграциях, которые позволяют разворачивать сообщения для частных экземпляров Discourse, поэтому пользователи могут продолжать использовать этот плагин в текущем виде. Однако это сопряжено с вышеуказанными ограничениями и рисками, связанными с использованием программного обеспечения, которое больше не поддерживается.

Есть возможность для кого-то создать решение, которое лучше решает эту проблему.


README и вышеупомянутый OP/Вики теперь обновлены соответствующим образом.

4 лайка