Discourseチャット統合

:information_source: Chat Integration is for using an external chat system together with Discourse — you may be looking for Discourse Chat which adds Chat functionality directly to Discourse.

:discourse2: Summary Discourse Chat Integration allows you to integrate your chat system of choice with Discourse.
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Features

discourse-chat-integration allows sending notifications about new Discourse posts to ‘group chats’ on a number of instant messaging platforms.

Notifications can be triggered by new topics, new replies, messages to a group, or mentions of a group. A notification in your instant messaging system will look something like this:

Configuration

  1. In your site settings, check chat_integration_enabled is :heavy_check_mark:
  2. Click on one of the providers below to see provider-specific setup instructions
  3. For more details, read ‘Configuring Rules’ below
Provider Notifications Slash Commands Post Transcripts Threaded Replies
Slack :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
Telegram :white_check_mark: :white_check_mark:
Discord :white_check_mark:
Mattermost :white_check_mark: :white_check_mark:
Google Chat :white_check_mark:
Matrix (element.io) :white_check_mark:
Zulip :white_check_mark:
Rocket.Chat :white_check_mark:
Gitter :white_check_mark:
Flowdock :white_check_mark:
Stride Docs
Microsoft Teams :white_check_mark:
Basecamp Docs
IRC Cloud Docs
Flock Docs
Webex :white_check_mark:

Terminology

There are three key concepts in discourse-chat-integration: Providers, Channels and Rules

Configuring Rules

In your forum’s admin panel, under Plugins, you should see a Chat Integrations section. Within that there will be tabs for each of your enabled providers:

Rules have a number of options which can be configured:

  • Type:
    • Normal - send notifications based on standard posts on the forum
    • Group Message - send notifications based on private messages which a specified group is a part of
    • Group Mention - send notifications whenever specified group is @mentioned in a standard post on the forum (mentions in private messages are ignored)
  • Filter:
    • All posts with threaded replies - notify for new posts matching this rule, create per-topic threads on the chat provider (not available in all integrations)
    • All posts and replies - notify for new posts matching this rule
    • First post only - notify only for new topics matching this rule
    • Tag added to topic - notify when a tag is added to a topic (the create post for category and tag changes site setting must be enabled for this to work)
    • Mute - prevent notifications matching this rule
  • Category (if type is ‘Normal’)
    • Match posts based on their category. Leave as “(all categories)” to match all posts on the forum
  • Group (if type is ‘Group Message’ or ‘Group Mention’)
    • Specify the group you want to receive notifications for
  • Tags
    • Enter a list of tags to match posts with at least one of the listed tags. Leave blank to match all posts

Multiple rules

When multiple rules match a post, the top-most rule in the user interface is executed. Rules are first sorted according to the criteria:

  1. Group mentions
  2. Group messages
  3. Normal

and then sorted within that by

  1. Mute
  2. All posts and replies
  3. First post only

For example, with the following rules

Filter Category Tags
All posts and replies Mentions of: @team (all tags)
Mute Support (all tags)
First post only Support unsupported-install
All posts and replies (all categories) (all tags)
Notifications would be triggered for

but not for

Security/Permissions

The site setting “chat integration discourse username” allows you to secure your notifications against leaking private information.

By default the system account is used, which means that there is no restriction on notifications sent. To secure your notifications you should create a non-staff user with appropriate access privileges, and enter its username in the site setting.

Slash Commands

If your provider supports slash commands, you can manage rules from within your chat interface. Each provider varies slightly in syntax, but in general they follow a similar structure. (Note that at this time, only the Slack integration implements threads.)

The commands available are

Posting a transcript

If your provider supports transcript posting, you can post your instant messaging history to discourse. This is currently only supported for the Slack provider. Note: You will need to be using the “Access Token” method of connecting to Slack.

Send /discourse post to see the interface. The plugin will try and “guess” where your current conversation starts, by looking for a gap in the message history of more than 3 minutes.

Alternatively, you can specify a number of posts after the command, or a URL to the first message.

To load a transcript for a Slack thread, you can use /discourse post thread {url}, where {url} is the permalink of the first message in the thread. For example:

/discourse post thread https://<slackname>.slack.com/archives/C6029G78F/p1522952993000017

Alternatively, you can use /discourse post with a thread-specific permalink like this:

/discourse post https://foo.slack.com/archives/G49KKS6AX/p1523062012000911?thread_ts=1523091738.000088&cid=G49KKS6AC

In both cases the “first/last message” UI is skipped - the entire thread is included in the transcript.

Adding new providers

Option 1: Submit a PR implementing your provider:

Option 2: Use your own plugin:
It is possible for third party plugins to register new “providers”. As an example, I’ve created a provider which sends webhooks to IFTTT. This could be used to automatically publish all posts in a category to facebook… or turn on your light when someone posts in Feature… or feed your fish whenever there’s a new Plugin.

CHANGELOG

TODO

Last edited by @tobiaseigen 2025-07-16T21:09:49Z

Check documentPerform check on document:
「いいね!」 115

チャット統合からタグやその他のフィルターに基づいて公開をトリガーできるように、Discourse 独自の ActivityPub Plugin のサポートを追加するのは興味深いでしょう。

「いいね!」 1

こんにちは、昨年 Telegram はフォーラム/トピック(グループチャット内のミニチャット)を発表しました。私は、それぞれのミニチャットを私のサイトのいずれかのカテゴリに接続しようとしました。しかし、私の理解では、トピックのアドレスはプラグインでサポートされていませんか?例えば、私のケースでは、各トピックには次のようなアドレスがあります:@telegram_topic /1@telegram_topic /2@telegram_topic /3 …\n標準のチャット名、例えば @telegram_chat を行に挿入すると、問題なく動作します。\nプラグインに同様のチャットアドレス(../1)を挿入する機能があれば非常に便利でしょう。そうすれば、ユーザーはサイトの特定のカテゴリに結び付けられた多くの独立したチャンネルの購読者である必要がなくなります。

「いいね!」 1

これを実現するためにタグの使用を検討しましたか?

:thinking: タグを使用しても、私のケースには完全には適していないと思います。タグを使用しても、すべての通知が1つのチャンネルに入り、情報のノイズが発生することを望みません。同時に、20のカテゴリ/タグに対して20のチャンネルを持つ代わりに、いくつかのミニテーマチャット(カテゴリ/タグ別)を整理できる1つのグループチャットがあり、各ユーザーが必要なミニチャットを表示でき、他のミニチャットを覗くことができるようにしたいです。私の地域(アジア)では、ほとんどの人がWhatsAppやTelegramのチャットを使用しており、フォーラムは人気がないため、私は悩んでいます。しかし、妥協点を見つけようとしています)。

追伸。もし私が繰り返し話すことがあっても、私の考えを正しく伝えようとしているだけなので、判断しないでください。私はGoogle翻訳を使用しています。

「いいね!」 1

あなたが理解している限り、どのチャットにどのタグを適用するかをフィルタリングできるはずです。

私たちが違うことを話しているように思えます :thinking: 私はタグ/カテゴリでチャットをフィルタリングすることについて質問があるわけではありません。
文脈のために。以前は、Telegramにはチャンネルとチャット(ボットを除く)がありました。これらのチャンネル/チャットルームには、約@chat_usernameまたは@channel_usernameというユーザー名があります。
昨年から、Telegramはチャットをフォーラムに変換することができるようになり、このようなミニテーマチャットが含まれています。これらのミニチャットには、たとえば@chat_username /1@chat_username /2のような独自のユーザー名があります。ミニチャット付きのこのようなチャットの便利な点は、ユーザーが互いに分離された複数のチャットを購読する必要がなくなり、1つのチャット(たとえば、私のサイトの名前が付いたもの)を購読するだけで、関心のある多くのミニチャット(私の場合は、各ミニチャットがサイトの特定のカテゴリを対象とします)にアクセスできることです。
今、私はこれらのミニチャットをこのプラグインに接続したいのですが、プラグインはミニチャットのユーザー名をchat_username /1としてサポートしていないように思えます。

「いいね!」 1

新しいメッセージや返信にタグを付けて、ターゲットチャットシステム(この場合はSlack)に投稿されないようにするルールを作成する方法はありますか?

やあ、アルバート。通常のDiscourseタグについて話しているなら、'ミュート’フィルターを設定して、そのタグが付いたトピックがSlackで通知をトリガーしないようにすることができます。

しかし、個々の投稿に関しては、それらをフィルタリングする方法はありません。

「いいね!」 1

私もアイザダさんと同じ要望があると思います。

トピックが有効になったTelegramグループチャット(Discourseのカテゴリに多少対応するもの)を作成し、Discourse/チャット連携設定で、どのトピックに投稿するかを指定できるようにしたいです。

現在、トピック付きのグループチャットを作成しようとしました(ボットと私だけ)。しかし、トピック内で/helpと入力すると、ボットは一般チャットで応答します。

デイビッドさん、この件について調べましたか? このStack Overflowのスレッドを見つけました。これはmessage_thread_id(トピックID)を取得する方法を示しており、ボットAPIが6.3でこれに対応したと述べています。

いずれにせよ、あなたの仕事に感謝します!:heart_hands:t2:

「いいね!」 1

Hi @ErlendMS :wave:。現時点では、このプラグインの機能強化に関するロードマップはありませんが、誰かが Telegram 連携に「スレッド」(またはトピック)サポートを追加したい場合は、おそらく pr-welcome となるでしょう。

Slack 連携にはスレッド サポートがいくつかあるため、そのロジックの一部を再利用できるはずです。

「いいね!」 3

このプラグインを使用して、レビューのためにフラグが立てられたときにSlackで通知を受け取ることは可能ですか?よろしくお願いします。

このプラグインは追加のAPI関数を公開していますか?

PRレビューはどこで依頼すればよいですか?先週後半に新しいプロバイダーを追加するためにこのPRを提出しましたが、まだレビュアーが割り当てられていません。Metaのさまざまな開発者ガイドを探しましたが、適切なPRリクエストに関するものは見つかりませんでした。

私のPRはこちらです:FEATURE: Added Power Automate as a new provider by benoitdesnoyers · Pull Request #204 · discourse/discourse-chat-integration · GitHub

よろしくお願いします。

「いいね!」 1

こんにちは皆さん!チャット連携プラグインのこのprをマージしました。

この変更は、チャット連携のルールフィルタリングからtags_changedオプションを削除することを目的としています。これは、トピックのカテゴリまたはタグが変更されたときに小さなアクション投稿を作成する設定を削除するためです。

ただし、discourse automationがインストールされている場合は、機能は 同じ ままです。次にこのプラグインのマイグレーションを実行すると、discourse automation プラグインに現在のものと同様に機能するスクリプトが追加されます。

これは作成される自動化の例です。

カテゴリと監視中のタグに基づいて、私のチャンネルに送信されます。

${ADDED_AND_REMOVED} はデフォルトのテキストであり、ルールと同じように動作します。

このスクリプトオプションのために、メッセージで使用できるいくつかのオプションも追加しました。

  • ${TOPIC} トピック名用
  • ${REMOVED_TAGS} 削除されたタグ用
  • ${ADDED_TAGS} 追加されたタグ用
    追加および削除の両方とも、タグが含まれている場合にのみトリガーされます。
    例:「added: ${ADDED_TAGS}」というメッセージは、追加されたタグがある場合にのみトリガーされます。
「いいね!」 4

他のPR(他のプロバイダーを使用していたユーザーは、トピックタグが変更された場合に自動化を使用できなかった)で問題が発生したため、それに対処するために、すべてのプロバイダーを考慮に入れたこの新しいPRを作成しました。

「トピックのカテゴリまたはタグが変更されたときに小さなアクション投稿を作成する」設定は、チャット統合には表示されません。

discourse automationがインストールされている場合、次回このプラグインのマイグレーションを実行すると、現在提供しているものと同様に機能するスクリプトがdiscourse automationプラグインに追加されます。


自動化は次のようになります。

プロバイダーは「有効」なプロバイダーです。

たとえば、DiscordSlackTelegramGoogle Chatが有効になっています。

「チャネル名」は、チャット統合設定で付けた名前です。

たとえば、ここの名前は「Spidey」です。

「いいね!」 3

Automation/chat-integration の変更点の新しいバッチがあります。

この新しいバッチでの注目すべき変更点は次のとおりです。

  • Trigger with PMs を追加しました。これにより、プライベートメッセージでもこの自動化をトリガーするかどうかを制御できます。
  • トピック作成中に Topic tags changed トリガー自動化がトリガーされていた問題を解決しました。
「いいね!」 3

以前にも言及したように – こちら

「投稿を作成するカテゴリとタグの変更」サイト設定は、現在プライベートタグ/カテゴリを漏洩する可能性があります。この機能を維持するために見つけた方法の1つは、それをウィスパーに移動することです。

これは小さな投稿と同様に機能しますが、機能させるには「ウィスパー許可グループ」に_いずれかの_グループを設定する必要があります。

この変更をコアに適用するPRと、その設定の使用を削除するchat-integrationのPRをマージしました。追加された自動化機能は、問題が発生した場合は、小さなアクションと1対1で対応するはずですので、お知らせください!

「いいね!」 3

このプラグインにさらにアップデートがありました:steam_locomotive:

Send Chat-Integration message オートメーションに trigger on フィールドを追加しました。

何をするものですか?

タグが以下のいずれかである場合にチェックします:

  • 追加および削除 (デフォルト)
  • 追加
  • 削除

現在、このチェックは包括的です。

良い例として、追加に設定した場合を挙げます。このオートメーションを実行するには、トピックに_いずれかの_タグが追加される必要があります。

Tags added を設定した場合、オートメーションテーブルは次のようになります:

トピックにタグを追加 トピックからタグを削除 オートメーションは実行されましたか?
:white_check_mark: :cross_mark: :white_check_mark:
:white_check_mark: :white_check_mark: :white_check_mark:
:cross_mark: :white_check_mark: :cross_mark:

Tags removed を設定した場合、オートメーションテーブルは次のようになります:

トピックからタグを削除 トピックにタグを追加 オートメーションは実行されましたか?
:white_check_mark: :cross_mark: :white_check_mark:
:white_check_mark: :white_check_mark: :white_check_mark:
:cross_mark: :white_check_mark: :cross_mark:
「いいね!」 2


件名:チャット連携設定でプラグインセクションにアクセスできません

こんにちは。

私はLXDAOフォーラムの管理者で、Discourseチャット連携プラグインをTelegramと接続するように設定しようとしています。公式ドキュメントによると、管理者パネルの「プラグイン」セクションでこれを設定できるはずです。

しかし、私の管理者ダッシュボードには、「一般」「モデレーション」「セキュリティ」「レポート」の4つのセクションしかアクセスできません。ドキュメントで言及されている「プラグイン」セクションが表示されていません。

以下の点について、ご説明いただけますでしょうか。

  1. チャット連携プラグインは、すでに私たちのフォーラムにインストールされていますか?
  2. プラグインセクションにアクセスするには、追加の権限が必要ですか?
  3. ホストされているDiscourseソリューションを使用している場合、プラグインのインストール/設定に関して制限はありますか?

管理者として、コミュニティのためにTelegram連携を適切に設定するには、どのような手順を踏むべきでしょうか?

ご協力ありがとうございます!