Set up Telegram integration using the discourse-chat-integration plugin

Solved: Exited the chat bot from that telegram group. And understood that if I wanted the bot to be the part of that group, then that group’s chat ID need to have a channel and a channel rule under itself.

1개의 좋아요

The Telegram integration works very well for channels but it’s unsuitable for groups-- it will spam its operation instructions every time a chat “event” happens (like someone joining or leaving the chat, or a message getting pinned). Even if you disable the slash commands entirely. Is there a way to get the bot to not respond to these events?

2개의 좋아요

Do you have group_privacy disabled?

4개의 좋아요

I tried that setting too and saw that it becomes every message as you say. Even with group_privacy enabled bots can still see these join/leave/pin events.

Hi,
I created the telegram bot, entered the key and activated the function in discourse. HTTPS is enabled (our site runs behind an apache proxy)
However the tab is not showing. Where can I debug this? I can not find any errors in the logs.
Is there a way to test the connection to telegram from inside the Discourse container?
thx

1개의 좋아요

short update on this. I entered the discourse container with docker exec -it container /bin/bash. then I executed the following:

curl https://api.telegram.org/bot123456789:ABCDEfgh2ZojwyChMz0xuIo2Wvg4ww3XGI4g/getMe

this returned an ok response with the name of my bot etc.

however the integration with discourse does not work yet. Is there a log file somewhere so that I can debug this? Any help is appreciated.

Is the force_https site setting enabled? Is the chat_integration_enable_telegram setting enabled?

2개의 좋아요

Hi,
yes both settings are enabled.
HTTPS is working fine, also with login integration with fb, google, tw.

what could be the cause, or where could I find the logs?

thx

@jucajuca

I am also facing same issue since last 4-5 days on my new discourse instance.

Hi @david, is there any way i can see the logs.

On my old instance notifications are working good with telegram bot, but in newer instance Chat ID is not getting generated. The curl command mentioned above is giving output as true from discourse instance. Other oauth plugins like google. twitter are working without any issues.

Thanks in advance.

1개의 좋아요

I just got it working on a new Discourse install by firing up rails c and manually running DiscourseChat::Provider::TelegramProvider.setup_webhook()

Hope that helps!

4개의 좋아요

Thanks a lot @codatory
@codinghorror Thanks for this awesome platform :slight_smile:

It worked :+1:

2개의 좋아요

can you elaborate a bit on this? should I run these commands from within the container? in which directory? I’m not a rails expert. thx! : )

Yeah; so you enter the container and run
rails c
Then wait a bit for it to load up. Once it’s loaded up you can paste in
DiscourseChat::Provider::TelegramProvider.setup_webhook(); exit
Then you can exit out of the container and it should be working.

2개의 좋아요

THANK YOU, this solved my issue But had to toggle the plugin off in my admin. Then on. Then run this.

1개의 좋아요

I have been able to get this working but not in a group. It will send me notifications directly as a chat between myself and the bot.

I have added the bot to a private group, the bot had admin access in the group. And I have added the group as a channel in the discourse plugin settings. But whenever I try and send a test notification to the group(telegram channel) it gives me the 422 error. Not matter what I do. This error is from within the discourse telegram plugin channel settings.

Can someone help really want to get this setup for our group.

This issue should now be resolved, thanks to this PR:

https://github.com/discourse/discourse-chat-integration/commit/0b85c2a0e54e52fbacda6a470553196dec57a0db

The most common issue is an invalid API key. Make sure you copy/pasted it correctly, and haven’t introduced any spaces before/after by accident.

2개의 좋아요

API token is working correctly, I can receive the notifications in a private message from the bot on telegram. It just cannot send to the group. Also everytime someone in the channel sends a message, the bot says “This channel is setup with chatID: …” very annoying

이제 이 오류가 발생합니다.

Errno::ECONNRESET: Connection reset by peer - SSL_connect
from /usr/local/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock’

이 설정을 어떻게 전환하든 동일한 문제가 발생합니다. 우회 방법이 있을까요?

알림을 설정하려고 하는데, 봇을 텔레그램 그룹에 추가해도 채팅 ID가 전송되지 않습니다. 여러 번 시도해 봤지만 매번 실패했습니다 :<

어떤 방법으로 문제를 해결할 수 있을까요? 이미 rails console 명령어를 실행해 봤습니다.

1개의 좋아요