question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apprise telegram send accepts invalid content (`<br/>`) and does not issue an error

See original GitHub issue

📣 Notification Service(s) Impacted Telegram

🐞 Describe the bug

AFAIK - Telegram shouldnt support <br/> etc, which is OK, but apprise wont give an error

apprise -vv -t "Test Message Title" -b "Test Message Body <br/> ok</br>" tgram://1234:aaaaaaaaa/-1001511191424
2022-06-14 08:28:50,202 - INFO - Notifying 1 service(s) asynchronously.
2022-06-14 08:28:50,723 - INFO - Sent Telegram notification.

💡 Screenshots and Logs

root@improvement-pamperedly:/app# apprise -V
Apprise v0.9.9
Copyright (C) 2022 Chris Caron <lead2gold@gmail.com>
This code is licensed under the MIT License.

💻 Your System Details:

  • Python 3.8.12
  • linux

🔮 Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
caronccommented, Jun 30, 2022

I merged the unit tests associated with this ticket since an extra set of tests can’t hurt after all. 🙂

I think we’re on the same page. Basically Apprise did not issue an error with respect to your example because there wasn’t one. Apprise will prevent Telegram from rejecting your provided HTML/TEXT/Markdown in the event it has characters that aren’t supported upstream. Instead it takes care of those characters for you so that your message can still get sent as intended.

If you get a zero-response from Apprise, then your message made it 100% successfully (even if it had to be slightly massaged to do so). A non-zero response really means there was a failure in some form and/or fashion.

So basically all is good. You don’t need to do any preemptive parsing on your end before you pass anything into Apprise.

0reactions
dgtlmooncommented, Jun 30, 2022

@caronc thanks again for your great work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notify_telegram · caronc/apprise Wiki - GitHub
It's through this bot that Apprise is able to send notifications onto Telegram to different users.
Read more >
Working Automation with Telegram Errors - #20 by petro
As the topic states, I have an automation that once triggered sends a picture via ... Error sending message: Invalid server response.
Read more >
How to set up push notifications in your Telegram bot
In this case, you would need to add another parameter to the send message URL, parse_mode . There are 2 parsing options: Markdown...
Read more >
How should I use parse_mode='HTML' in telegram python bot?
First, you need to import ParseMode from telegram like this: from telegram import ParseMode. Then, all you need is to specify ...
Read more >
Text - GovInfo
If, after contacting the agency, you find the material is not available, please notify the Director of the Federal Register, National Archives and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found