1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-22 07:42:28 +00:00

Fixed: Sending ntfy.sh notifications with unicode characters

(cherry picked from commit a169ebff2adda5c8585c6aae6249b1c1f7c12264)
This commit is contained in:
Mark McDowall 2024-04-05 23:11:03 -07:00 committed by Bogdan
parent ca0b900d92
commit 2941e0c4b7

View file

@ -111,18 +111,18 @@ private void SendNotification(string title, string message, HttpRequestBuilder r
{
try
{
requestBuilder.Headers.Add("X-Title", title);
requestBuilder.Headers.Add("X-Message", message);
requestBuilder.Headers.Add("X-Priority", settings.Priority.ToString());
requestBuilder.AddQueryParam("title", title);
requestBuilder.AddQueryParam("message", message);
requestBuilder.AddQueryParam("priority", settings.Priority.ToString());
if (settings.Tags.Any())
{
requestBuilder.Headers.Add("X-Tags", settings.Tags.Join(","));
requestBuilder.AddQueryParam("tags", settings.Tags.Join(","));
}
if (!settings.ClickUrl.IsNullOrWhiteSpace())
{
requestBuilder.Headers.Add("X-Click", settings.ClickUrl);
requestBuilder.AddQueryParam("click", settings.ClickUrl);
}
if (!settings.AccessToken.IsNullOrWhiteSpace())