This plugin is currently broken with latest tests-passed, I will probably fix it when I have time, but not now
Summary | Bridge your discourse chat to telegram | |
Repository Link | https://github.com/Lhcfl/discourse-chat-bridge | |
Install Guide | How to install plugins in Discourse |
I’m working on bridging Discourse to other platforms. Currently it only supports Telegram, but I plan to support Matrix, and maybe Discord or QQ in the future, depending on my energy and the support I receive.
This plugin only supports the absolutely latest Discourse
test-passed
branch. Why? Because Discourse Chat changes their code frequently, I have to sync with them.So if the plugin is available on your site and the plugin is important to you, please reduce the frequency of updating discourse, because I may not have time to synchronize the version of the patch code with discourse.
Telegram bridge
IMPORTANT NOTES
This plugin uses usernames with .tgid
and .tg
suffixes to synchronize user information (Telegram
→ Discourse)
If there are usernames with the above suffixes on your website, the user may be taken over by this plugin!
Feature list
This plugin is currently my own work. It is difficult for me to spend too much energy to fix bugs that I think are not urgent enough. So if the bug you find is not in this list, please consider PR.
This plugin supports syncing the following content:
-
Plain Text (Certainly!)
-
Formated Text: Bold, Italic,
strikethrough, spoiler,inline code
and"code block"
-
Quotations (only Discourse → Telegram)
We do not support quotations for Telegram → Discourse now because Telegram does not yet updated their API for quotes. -
Pictures, stickers and videos
As I write this sentence, there seems to be something broken in Discourse. Simply posting a picture without a caption will not trigger the:chat_message_created
event. Therefore, it is impossible to forward Discourse pictures to Telegram. This error may be solved automatically in the future, but no matter what, I will fix it. -
Reply
-
Message edition (Text only)
-
Forward messages (Telegram → Discourse)
-
Message deletion (Discourse → Telegram)
We will NOT support message deletion for Telegram → Discourse because the Telegram bot api does not provide an interface for listening to message deletion events. -
User avatar and usernames (Telegram → Discourse)
The following content are not implemented and are planed to be supported in the future
- Quotation (Telegram → Discourse)
- Album pictures (Discourse ↔ Telegram)
Currently only supports syncing the first picture
Preview
Configuration
SiteSetting.chat_telegram_bridges
It is a list and you need to fill in each column in this format:
discourse_chat_channel_id,telegram_chat_id,bot_token
For example
3,-123456789,123456789-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
will bridge discourse chat channel 3 ↔ telegram chat -123456789 using bot with token 123456789-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
DO NOT add spaces after commas.
It’s certainly not elegant, but I don’t have the extra energy to write a beautiful configuration interface for it. Please PR if you want it.
Allow sync videos and video stickers
Telegram’s dynamic stickers, gifs, and videos are basically in webp
format. You need to allow uploading it in the SiteSettings.authorized_extensions
, otherwise you will only get a [This message is not supported yet]
CHANGELOG
- 2023/11/07 Released 0.0.1
TODO
- Bridge Matrix to discourse