Zabbix-in-Telegram icon indicating copy to clipboard operation
Zabbix-in-Telegram copied to clipboard

Can`t send message to public chat

Open Nicolai6120 opened this issue 5 years ago • 1 comments

I'm trying this one command to test sending from cli

zbxtg.py "@xxx" test test

where @xxx is my personal profile, and I'm receiving new message from @MyAlertingBot to my personal account (@xxx)

image

But if I am trying

zbxtg.py "@yyy" test test

where @yyy is public channel, I'm getting this error zbxtg.py: You need start a conversation with your bot first in '@yyy' group chat, type '/start@MyAlertingBot'

After sending "/start@MyAlertingBot" message in @yyy chat nothing happens.

At the same time alerting from graylog via @MyAlertingBot to @yyy works well...

I have read all the wiki pages and all the repository files, but can`t find the answer.

Reinviting @MyAlertingBot to @yyy chat has no effect zbx_tg_tmp_dir is 100% writable, becase new file was created there after first zbxtg.py script call

My config: (zbx_server_version 4)

image

Debug info: image

Nicolai6120 avatar Nov 29 '19 19:11 Nicolai6120

Temporary workaround as to add following string to /var/tmp/zbxtg/uids.txt :

<any_string_identifier>;group;<chat_id>

to send with zbxtg.py <any_string_identifier> test test --group

You can even send without --group flag by adding this instead

<any_string_identifier>;private;<chat_id>

Example: add -470155885;private;-470155885 and then call zbxtg.py -470155885 test test

Getting chat_id of da group is a bit tricky, i was using /chatid command of @metturika_bot to get it.

P.S. This bug seems to be somewhat easy to fix tho.

melkor217 avatar Aug 19 '20 14:08 melkor217