Ombi-app / Ombi

Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
http://ombi.io
GNU General Public License v2.0
3.7k stars 395 forks source link

If username/alias/UserPreference contains _ the notification won't work. #3303

Closed ImCheesecake closed 2 years ago

ImCheesecake commented 4 years ago

Describe the bug If a Telegram username/alias/UserPreference contains characters like '_', the notifications won't send. Instead you get an error.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'User Management'
  2. Click on 'Details/Edit, then Notification Details'
  3. Scroll down to 'Telegram'
  4. Enter a username containing '_' (my user had the name L_bobo)
  5. Make a request with as the user (or approve/deny as admin)
  6. See error

Expected behavior I'm using {UserPreference} to tag users in Telegram and this user should be tagged like the other users who doesn't have a _ in their username

Logs (Logs directory where Ombi is located) 2019-12-12 18:37:21.601 +01:00 [Debug] Calling Execute on job Notifications.INotificationService 2019-12-12 18:37:23.617 +01:00 [Information] Template RequestApproved is disabled for Mobile 2019-12-12 18:37:23.702 +01:00 [Error] StatusCode: BadRequest, Reason: Bad Request, RequestUri: https://api.telegram.org/bot[TOKEN]/sendMessage

Desktop (please complete the following information):

Ombi Version (please complete the following information):

Additional context This user seems to trigger the mobile template each time he requests something new or if I approve/deny his request. Can't find the reason why either.

ombi-bot commented 4 years ago

Hi!
Thanks for the issue report. Before a real human comes by, please make sure you used our bug report format.
Have you looked at the wiki yet? https://github.com/tidusjar/ombi/wiki/
Before posting make sure you also read our FAQ.
Make the title describe your issue. Having 'not working' or 'I get this bug' for 100 issues, isn't really helpful.
If we need more information or there is some progress we tag the issue or update the tag and keep you updated.
Thanks!
Ombi Bot.