저는 Discourse를 다른 플랫폼과 연결하는 작업을 하고 있습니다. 현재는 Telegram만 지원하지만, Matrix를 지원할 계획이며, 제 에너지와 받는 지원에 따라 향후 Discord나 QQ도 지원할 수 있습니다.
이 플러그인은 최신 Discourse test-passed 브랜치만 지원합니다. 왜냐하면 Discourse Chat이 코드를 자주 변경하기 때문에, 저 역시 그와 동기화해야 하기 때문입니다.
따라서 해당 플러그인이 여러분의 사이트에서 사용 가능하고 여러분에게 중요한 경우, Discourse 업데이트 빈도를 줄여주세요. 패치 코드 버전을 Discourse와 동기화할 시간이 없을 수 있습니다.
Telegram 브리지
중요 사항
이 플러그인은 .tgid와 .tg 접미사가 포함된 사용자 이름을 사용하여 사용자 정보를 동기화합니다(Telegram
→ Discourse)
여러분의 웹사이트에 위의 접미사가 포함된 사용자 이름이 있는 경우, 해당 사용자가 이 플러그인에 의해 인수될 수 있습니다!
기능 목록
이 플러그인은 현재 제 개인 작업입니다. 제가 긴급하지 않다고 판단하는 버그 수정에 너무 많은 에너지를 쓰는 것은 어렵습니다. 따라서 발견한 버그가 이 목록에 없다면 PR을 고려해 주세요.
이 플러그인은 다음 내용을 동기화하는 것을 지원합니다:
일반 텍스트 (당연합니다!)
서식 지정 텍스트: 굵게, 기울임, 취소선, 스포일러, 인라인 코드 및
"코드 블록"
인용 (Discourse → Telegram만 지원)
Telegram이 인용을 위한 API를 아직 업데이트하지 않았기 때문에, 현재 Telegram → Discourse 인용은 지원하지 않습니다.
이미지, 스티커 및 비디오
이 문장을 작성하는 시점에는 Discourse에 뭔가 깨진 것 같습니다. 캡션 없이 단순히 이미지를 게시하면 :chat_message_created 이벤트가 트리거되지 않습니다. 따라서 Discourse 이미지를 Telegram으로 전달하는 것은 불가능합니다. 이 오류는 미래에 자동으로 해결될 수 있지만, 어쨌든 제가 수정할 것입니다.
답글
메시지 편집 (텍스트만)
메시지 전달 (Telegram → Discourse)
메시지 삭제 (Discourse → Telegram)
Telegram 봇 API가 메시지 삭제 이벤트를 수신할 인터페이스를 제공하지 않기 때문에, Telegram → Discourse 메시지 삭제는 지원하지 않습니다.
사용자 아바타 및 사용자 이름 (Telegram → Discourse)
다음 내용은 구현되지 않았으며, 향후 지원될 계획입니다.
인용 (Telegram → Discourse)
앨범 이미지 (Discourse ↔ Telegram)
현재는 첫 번째 이미지만 동기화하는 것을 지원합니다
Hello!
Thank you for such a wonderful plugin This is what I’ve been thinking about for the last couple of months . You seem to have captured my thoughts
I want to clarify. Will the plugin only work for chat mode or can it also be connected to a topic?
Hello! Sorry if I didn’t express my thoughts enough . I’m using Google Translate and can’t be sure I’m understanding the posts on this forum correctly. And I don’t know how to program, so I don’t always understand programmers’ messages. Let me show you my question in diagram form:
I probably understand what you mean… Do you want the content in chat to be published in the topic simultaneously?
I had a ready-made nodejs software before this, but it needed to be adapted to other forums. And I have been very busy recently and have no time to do this.
For a while, it will only support chat.
I’m not entirely sure if I understood your question correctly, but I’ll try to explain step by step what I envision. In the period from 2021 to 2022, I attempted to create a forum based on Discourse. However, despite the relevance of the forum, the project was unsuccessful because, in our region (Central Asia), the majority of residents prefer using messengers such as Telegram and WhatsApp instead of registering and using new features on websites.
With the advent of artificial intelligence, I observed changes in the rules of the game. Various services, including websites and applications designed for the use of artificial intelligence, emerged. Messengers cannot fully provide functionality for working with artificial intelligence, although Telegram is more advanced than WhatsApp. Learning about new plugins in Discourse, such as Discourse AI and Chatbot, I realized that this was a new opportunity for my website.
I want to fully utilize the ability to create thematic posts (topics). Recently, I asked a question here - on Meta about the Chatbot plugin, wondering if the GPT chat can remember the first post and not forget the content of the main topic after numerous messages in the thread. Then, @merefield replied that the chatbot will always remember the first post. This became the main criterion for applying this plugin on my site.
I plan to create thematic sections on the forum for interaction with artificial intelligence and real people. The communication format in Discourse through creating topics is more advanced technically compared to chats. Therefore, chats are not entirely suitable for training the bot since in a chat, the bot may not remember the initial topic among numerous recent messages. I plan to use the capability of creating thematic posts, training the bot in the first post so that it can respond to user questions within the specified topic.
However, considering the popularity of messengers in our region and people’s habit of using chats, I am contemplating how to provide users with the Discourse forum experience without abandoning their familiar messengers. After installing the Discourse Chat Bridge plugin, I found that it connects the Discourse chat with the Telegram chat but does not create a bridge between a published post on the forum and the Telegram chat.
My plans include:
A user (possibly site personnel) sends a private message (PM) to the AI bot on the forum with instructions on how the bot should respond to subsequent messages, such as advising other users on using the forum.
The user links this private message to the artificial intelligence in a regular Telegram bot.
The user shares the link to the Telegram bot with other users who are not yet registered on the forum but want to learn more about it.
Each user, clicking on the link in the Telegram bot, starts a private conversation with artificial intelligence, which responds and advises according to the instructions posted on the forum.
All user messages directed to artificial intelligence are published in a private forum topic. Thus, Telegram users do not see messages from other Telegram users, as each user communicates separately with the Telegram bot.
So you plan to use the Telegram bot as a funnel for users coming to the forum or you want to allow users to stay only in Telegram interacting with the Ai bot (the Ai bot being a proxy between the forum content and the user)?
Ok, I got you. I’m currently doing general prep work on my website. If you allow, I will return to this topic in a few weeks with more specific proposals in a personal message to you.
While testing, it seems I discovered a bug in the plugin. After I send a message to the chat via Telegram → Discourse, nothing appears on the site in the chat (sometimes only 1234567890.tgid username appears). To solve this problem I have to refresh the site page. After updating, the name of the message sender appears, but the contents of the message itself are not shown. To solve this problem, I rearrange the HTML and then the chat message text appears. Here’s a video:
Also, I wanted to clarify. If I send a message via Telegram to a group chat without using the Reply button, the message does not reach the chat in Discourse. It turns out that in order for the message to be sent, I must select the Reply function in telegram chat. But what if I don’t want to respond to anyone’s message in the chat, but just want to send a message with a question to all group members?