caronc / nzb-notify

Push Notifications to a large number of supported services for NZBGet and SABnzbd (based on Apprise)
GNU General Public License v3.0
129 stars 15 forks source link

Notify.py trunctates Telegram ChatID #28

Closed DePingus closed 7 years ago

DePingus commented 7 years ago

Hi. I'm using Telegram and my ChatID is 14 characters long (including the starting minus sign). I tested my bot APIkey and this 14 character ChatID with curl it works fine. But when I run Notify.py either from nzbget or the command line using:

python ./Notify.py -s tgram://XXXX:XXXX/-1234567890123 -t "Testing" -b "Hello World"

I get:

Failed to send Telegram:-1234567890 notification: (400) Bad Request: chat not found.

In the error message you can see the ChatID is only the first 11 characters of what I wrote in the command line (obviously I'm using a fake ChatID in these examples but I think you get the gist). I get the same error message in nzbget.

Thanks for taking the time!

caronc commented 7 years ago

I bumped the limit up. I'm not quite sure why i fixed it at 10 characters when i first wrote the plug-in; sorry about that :blush:.

Give it another go and let me know (you'll need to check out the master branch)

DePingus commented 7 years ago

Wow. Awesome! Thank you so much for the quick fix. It works perfectly.