amyreese / znc-push

Push notification service module for ZNC
http://noswap.com/projects/znc-push
MIT License
555 stars 125 forks source link

Not Pushing to Telegram Sporadically #229

Open dtimekeeper opened 7 years ago

dtimekeeper commented 7 years ago

Hi,

I've played around with the debug info and channel_conditions, and it looks like even when it's triggered (in znc push) correctly, I don't seem to receive the message from my telegram bot consistently.

Sometimes it appears to work and sometimes it doesn't, even for the same words. I can see in the debug log that:

(5:16:46pm)  -› Query with *push (znc@znc.in)
(5:16:46pm)  -› Total querys: 8981 (~3 per day)
(5:16:46pm) (*push) service: telegram
(5:16:46pm) (*push) service_host: api.telegram.org
(5:16:46pm) (*push) service_url: /bot373889237:AABCDNfj6B8YbJ9gOohrpXt4mOCbHFk8jg4/sendMessage
(5:16:46pm) (*push) service_auth:
(5:16:46pm) (*push) use_port: 443
(5:16:46pm) (*push) use_ssl: 1
(5:16:46pm) (*push) use_post: 1
(5:16:46pm) (*push) NOT using libcurl
(5:16:46pm) (*push) Building notification to api.telegram.org/bot373889237:AAGQUNfj6B8YbJ9gOohrpXt4mOCbHFk8jg4/sendMessage...
(5:16:46pm) (*push) User-Agent: ZNC Push/dev
(5:16:46pm) (*push) Query string: chat_id=96602434&text=%23randtest%3A+%5Btimetest%5D+timekeep
(5:16:46pm) (*push) Request sending

But no message comes through, and when it does work, the debug message is exactly the same, so it seems like it might be an issue on Telegram's side?

If you have any ideas where I could check otherwise for this, I'd be very much appreciative.

Thanks!

Lann094 commented 6 years ago

I just want to add some more detail and say I've tested from both Postman on a Windows machine, and also using curl directly on my ZNC server, pushing the exact same data using the same endpoint and chat_id, and the api is sending the messages correctly.

I can also get it to get messages through to me when doing a manual push, but the automatic pushes have not reached me for a few days now, despite showing in debug correctly.

amyreese commented 6 years ago

Can you try building znc-push with make curl=yes? I believe the default SSL module for ZNC doesn't fully support the Telegram service.

Lann094 commented 6 years ago

Okay, I've just built it as such and loaded it up. I'll monitor how it goes for a few days (if anyone talks to me), and see if anything is different.

accorvin commented 6 years ago

@Lann094 Did rebuilding the module with make curl=yes solve your problem? I've been seeing a similar issue to what you described.

Lann094 commented 6 years ago

Wow sorry, I completely forgot to report back.

Building as advised appears to have resolved the issue for me, and it doesn't seem to be missing any more notifications @accorvin.