Telegram Notifications Plugin (discourse-telegram-notifications)

The appearance can be controlled by going to your admin panel, “customise”, “text”, then search for “telegram_notifications”. You should see things like this which you can edit:

https://github.com/davidtaylorhq/discourse-telegram-notifications/blob/master/config/locales/server.en.yml#L22-L32

Very happy to update the defaults if anyone has some suggestions. Either via a PR, or just share your edited versions in this topic and I can update them in the repo :slight_smile:

Hi @david,
Thanks for this.
I also tried to customize the text on the Admin → Customize → Text page:

/admin/customize/site_texts?q=discourse_telegram_notifications

However, it isn’t working from there. It would be great if it was working.

Do you get an error?

No, I can’t find any logs. It seems like there’s no error. it’s simply not formatting. I took out the <pre>for all the text coming from the site. I did this by visiting /admin/customize/site_texts?q=discourse_telegram_notifications and editing the text fields.

It seems like I might have to do the old school way and hardcode it.

Is there any way you’re aware of to change the font?
Our forum activities are not in English and the default font that is sent in Telegram looks bad. I dont know if its on the plugin end or the Telegram end.

إعجاب واحد (1)

Hey @david, I created a pull request: https://github.com/davidtaylorhq/discourse-telegram-notifications/pull/17

Sounds great! Please can you share a screenshot of what the messages will look like in Telegram?

That was strange to me to find the Profile section.
image

Why not to move it to the notifications section?

إعجاب واحد (1)

Hello! I receive multiple notifications on Telegram that are copies. One notification can be sent 2-5 times. In a standard user notifications interface, I see only 1 notification. Why may this situation happen?

Hey @david
I got the bot up and running and working great for some users.
However a user now tried to set it up but can’t get a ‘Chat ID’, and I can’t figure out the problem.
I’m trying to avoid deleting the bot altogether and redoing it, so other users won’t be affected…
Any help will be appreciated.
Here’s a screenshot by that user:


same error as above, can’t get a ‘Chat ID’

image

إعجاب واحد (1)

more info, my logs:

Message

Failed to send Telegram message. Message data= "{\"url\":\"https://site.net/telegram/hook/2bae74eecc11436c25d7324133c55d72\"}" response="{\"ok\":false,\"error_code\":404,\"description\":\"Not Found\"}"

Backtrace

/var/www/discourse/plugins/discourse-telegram-notifications/services/discourse_telegram_notifications/telegram-notifier.rb:46:in `doRequest'
/var/www/discourse/plugins/discourse-telegram-notifications/services/discourse_telegram_notifications/telegram-notifier.rb:24:in `setupWebhook'
/var/www/discourse/plugins/discourse-telegram-notifications/plugin.rb:251:in `execute'
/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-3.0.0/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/app/jobs/base.rb:221:in `block in perform'
/var/www/discourse/app/jobs/base.rb:217:in `each'
/var/www/discourse/app/jobs/base.rb:217:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.2.1/lib/sidekiq/processor.rb:196:in `execute_job'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.2.1/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'"

Hello.

We have Discourse with this plug-in. And the user profile has a custom field for Telegram chat id. I need to transfer the value of this field to the user profile page at our site. I’ve prepared a script at our server to process webhook requests from Discourse and configured a webhook for the user events. This webhook starts, but the data transferred to our server in the request have no “Telegram chat id” field and no value. Is this a feature of this plugin? Or can i do something other to get this value?

هل تمكن أي شخص من تشغيل هذا مؤخرًا؟ لقد جربته على مضيفين مختلفين ولكنه لا يبدو أنه يعمل. لا أتلقى ردًا من الروبوت للحصول على معرف الدردشة تمامًا كما ذكر الآخرون في الدردشات أعلاه. أيضًا، لا أرى حقل معرف الدردشة في تفضيلات الملف الشخصي. ومع ذلك، أرى إعدادات المكون الإضافي حيث أقوم بتمكين المكون الإضافي وتوفير رمز الروبوت.

إعجاب واحد (1)

مرحباً.

لقد قمت بتثبيت إضافة على Discourse المستضاف ذاتيًا. لا يقوم الروبوت الخاص بنا بإرجاع أي رسائل عند إعطاء أمر مثل /start. لا نعرف ما الذي يجب كتابته في حقل “معرف دردشة Telegram” الخاص بملف تعريف المستخدم. لقد تحققت من سجل الوصول (access.log) لخادم nginx في حاوية Discourse، لكن لم تردني أي طلبات للروبوت. ماذا يجب أن نفعل لحل هذه المشكلة؟

إعجاب واحد (1)

هل هناك فرصة لاستخدام روبوتات أخرى لأداء نفس الوظيفة عن طريق فصل رموز الروبوتات بـ “|”؟

بحيث في حالة وجود مشكلة مع الروبوتات القديمة، يمكننا إضافة روبوت آخر للانضمام للمستخدمين الجدد دون التأثير على المستخدمين القدامى؟ ستكون هذه فكرة جيدة للاستخدام المستمر لهذا المكون الإضافي.

@david هل تعمل إضافة إشعارات تيليجرام هذه بعد؟

مرحباً @david، هل هناك إصلاح مخطط له لهذا المكون الإضافي؟ أنا أيضًا لا أتلقى معرف دردشة من الروبوت ويبدو أنه لا توجد سجلات مدرجة.

عذرًا على الإزعاج هنا! يجب أن يتم إصلاحه بواسطة

لإعادة الأمور إلى العمل، يرجى تحديث المكون الإضافي، ثم قم بتشغيل المكون الإضافي وإيقافه مرة أخرى. (قم بتعطيل إعداد telegram notifications enabled، ثم أعد تمكينه)

إعجاب واحد (1)

تم تقسيم 4 مشاركات إلى موضوع جديد: 600% استخدام وحدة المعالجة المركزية؟