diff --git a/Tranga/NotificationManager.cs b/Tranga/NotificationManager.cs index 6488d63..2612725 100644 --- a/Tranga/NotificationManager.cs +++ b/Tranga/NotificationManager.cs @@ -27,11 +27,14 @@ public abstract class NotificationManager return (objectType == typeof(NotificationManager)); } - public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, + JsonSerializer serializer) { JObject jo = JObject.Load(reader); if (jo["notificationManagerType"]!.Value() == (byte)NotificationManagerType.Gotify) return jo.ToObject(serializer)!; + else if (jo["notificationManagerType"]!.Value() == (byte)NotificationManagerType.LunaSea) + return jo.ToObject(serializer)!; throw new Exception(); }