diff --git a/BTCPayServer/Controllers/NotificationsController.cs b/BTCPayServer/Controllers/NotificationsController.cs index 80e00df41..77794376b 100644 --- a/BTCPayServer/Controllers/NotificationsController.cs +++ b/BTCPayServer/Controllers/NotificationsController.cs @@ -5,11 +5,11 @@ using System.Security.Claims; using System.Text; using System.Threading.Tasks; using BTCPayServer.Data; -using BTCPayServer.Events.Notifications; using BTCPayServer.Filters; using BTCPayServer.HostedServices; using BTCPayServer.Models.NotificationViewModels; using BTCPayServer.Security; +using BTCPayServer.Services.Notifications; using Google; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; diff --git a/BTCPayServer/Events/Notifications/NotificationEvent.cs b/BTCPayServer/Events/NotificationEvent.cs similarity index 51% rename from BTCPayServer/Events/Notifications/NotificationEvent.cs rename to BTCPayServer/Events/NotificationEvent.cs index 55235fae0..d26870d45 100644 --- a/BTCPayServer/Events/Notifications/NotificationEvent.cs +++ b/BTCPayServer/Events/NotificationEvent.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using BTCPayServer.Services.Notifications.Blobs; -namespace BTCPayServer.Events.Notifications +namespace BTCPayServer.Events { internal class NotificationEvent { diff --git a/BTCPayServer/HostedServices/NotificationDbSaver.cs b/BTCPayServer/HostedServices/NotificationDbSaver.cs index 4eb76ad97..f307d2eec 100644 --- a/BTCPayServer/HostedServices/NotificationDbSaver.cs +++ b/BTCPayServer/HostedServices/NotificationDbSaver.cs @@ -5,7 +5,7 @@ using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using BTCPayServer.Data; -using BTCPayServer.Events.Notifications; +using BTCPayServer.Events; using BTCPayServer.Models.NotificationViewModels; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Caching.Memory; diff --git a/BTCPayServer/Hosting/BTCPayServerServices.cs b/BTCPayServer/Hosting/BTCPayServerServices.cs index 4d2889c3f..2034936d0 100644 --- a/BTCPayServer/Hosting/BTCPayServerServices.cs +++ b/BTCPayServer/Hosting/BTCPayServerServices.cs @@ -46,7 +46,7 @@ using BTCPayServer.Security.Bitpay; using Serilog; using BTCPayServer.Security.GreenField; using BTCPayServer.Services.Labels; -using BTCPayServer.Events.Notifications; +using BTCPayServer.Services.Notifications; namespace BTCPayServer.Hosting { diff --git a/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs b/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs index 7b4fbfb91..9d5f6bf57 100644 --- a/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs +++ b/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs @@ -6,7 +6,7 @@ using System.Text; using System.Threading.Tasks; using BTCPayServer.Data; using BTCPayServer.Events; -using BTCPayServer.Events.Notifications; +using BTCPayServer.Services.Notifications.Blobs; using Newtonsoft.Json; namespace BTCPayServer.Models.NotificationViewModels diff --git a/BTCPayServer/Events/Notifications/NewVersionNotification.cs b/BTCPayServer/Services/Notifications/Blobs/NewVersionNotification.cs similarity index 91% rename from BTCPayServer/Events/Notifications/NewVersionNotification.cs rename to BTCPayServer/Services/Notifications/Blobs/NewVersionNotification.cs index 5f16ec564..f778f8c68 100644 --- a/BTCPayServer/Events/Notifications/NewVersionNotification.cs +++ b/BTCPayServer/Services/Notifications/Blobs/NewVersionNotification.cs @@ -2,7 +2,7 @@ using BTCPayServer.Models.NotificationViewModels; using Newtonsoft.Json; -namespace BTCPayServer.Events.Notifications +namespace BTCPayServer.Services.Notifications.Blobs { internal class NewVersionNotification : NotificationBase { diff --git a/BTCPayServer/Events/Notifications/NotificationBase.cs b/BTCPayServer/Services/Notifications/Blobs/NotificationBase.cs similarity index 94% rename from BTCPayServer/Events/Notifications/NotificationBase.cs rename to BTCPayServer/Services/Notifications/Blobs/NotificationBase.cs index 44c992366..e1f906509 100644 --- a/BTCPayServer/Events/Notifications/NotificationBase.cs +++ b/BTCPayServer/Services/Notifications/Blobs/NotificationBase.cs @@ -3,7 +3,7 @@ using BTCPayServer.Data; using BTCPayServer.Models.NotificationViewModels; using Newtonsoft.Json; -namespace BTCPayServer.Events.Notifications +namespace BTCPayServer.Services.Notifications.Blobs { // Make sure to keep all NotificationEventBase classes in same namespace // because of dependent initialization and parsing to view models logic diff --git a/BTCPayServer/Events/Notifications/NotificationSender.cs b/BTCPayServer/Services/Notifications/NotificationSender.cs similarity index 89% rename from BTCPayServer/Events/Notifications/NotificationSender.cs rename to BTCPayServer/Services/Notifications/NotificationSender.cs index ef71127b5..3a53b3cea 100644 --- a/BTCPayServer/Events/Notifications/NotificationSender.cs +++ b/BTCPayServer/Services/Notifications/NotificationSender.cs @@ -1,9 +1,11 @@ using System.Linq; using System.Threading.Tasks; using BTCPayServer.Data; +using BTCPayServer.Events; +using BTCPayServer.Services.Notifications.Blobs; using Microsoft.AspNetCore.Identity; -namespace BTCPayServer.Events.Notifications +namespace BTCPayServer.Services.Notifications { public class NotificationSender {