From 0f0902c93207ced7ab9cb0dfdef94e30454b7a4a Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 21 Jun 2023 18:03:48 +0200 Subject: [PATCH] LunaSea changed to id device/id or user/id instead of full url --- Tranga/NotificationManagers/LunaSea.cs | 8 ++++---- Website/index.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tranga/NotificationManagers/LunaSea.cs b/Tranga/NotificationManagers/LunaSea.cs index 3ebc165..8cf2475 100644 --- a/Tranga/NotificationManagers/LunaSea.cs +++ b/Tranga/NotificationManagers/LunaSea.cs @@ -6,18 +6,18 @@ namespace Tranga.NotificationManagers; public class LunaSea : NotificationManager { - public string webhook { get; } + public string id { get; } private readonly HttpClient _client = new(); - public LunaSea(string webhook, Logger? logger = null) : base(NotificationManagerType.LunaSea, logger) + public LunaSea(string id, Logger? logger = null) : base(NotificationManagerType.LunaSea, logger) { - this.webhook = webhook; + this.id = id; } public override void SendNotification(string title, string notificationText) { logger?.WriteLine(this.GetType().ToString(), $"Sending notification: {title} - {notificationText}"); MessageData message = new(title, notificationText); - HttpRequestMessage request = new(HttpMethod.Post, webhook); + HttpRequestMessage request = new(HttpMethod.Post, $"https://notify.lunasea.app/v1/custom/{id}"); request.Content = new StringContent(JsonConvert.SerializeObject(message, Formatting.None), Encoding.UTF8, "application/json"); HttpResponseMessage response = _client.Send(request); if (!response.IsSuccessStatusCode) diff --git a/Website/index.html b/Website/index.html index 8182f64..d6e9667 100644 --- a/Website/index.html +++ b/Website/index.html @@ -142,7 +142,7 @@
LunaSea
Configured: ✅❌
- +