diff --git a/Oqtane.Server/Controllers/UserController.cs b/Oqtane.Server/Controllers/UserController.cs index 6fb3c93b..d850f9ae 100644 --- a/Oqtane.Server/Controllers/UserController.cs +++ b/Oqtane.Server/Controllers/UserController.cs @@ -157,6 +157,7 @@ namespace Oqtane.Controllers notification.CreatedOn = DateTime.UtcNow; notification.IsDelivered = false; notification.DeliveredOn = null; + notification.SendOn = DateTime.UtcNow; _notifications.AddNotification(notification); } @@ -385,6 +386,7 @@ namespace Oqtane.Controllers notification.CreatedOn = DateTime.UtcNow; notification.IsDelivered = false; notification.DeliveredOn = null; + notification.SendOn = DateTime.UtcNow; _notifications.AddNotification(notification); _logger.Log(LogLevel.Information, this, LogFunction.Security, "Password Reset Notification Sent For {Username}", user.Username); } diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 0db9ece5..6c2af753 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -22,10 +22,14 @@ + + + + diff --git a/Oqtane.Server/Scripts/Notification.01.00.01.00.sql b/Oqtane.Server/Scripts/Notification.01.00.01.00.sql new file mode 100644 index 00000000..3acdbf29 --- /dev/null +++ b/Oqtane.Server/Scripts/Notification.01.00.01.00.sql @@ -0,0 +1,9 @@ +/* + +Version 1.0.1 Notification migration script + +*/ + +ALTER TABLE [dbo].[Notification] ADD + [SendOn] [datetime] NULL +GO \ No newline at end of file diff --git a/Oqtane.Shared/Models/Notification.cs b/Oqtane.Shared/Models/Notification.cs index aeb7235d..7ccdbd9d 100644 --- a/Oqtane.Shared/Models/Notification.cs +++ b/Oqtane.Shared/Models/Notification.cs @@ -22,6 +22,7 @@ namespace Oqtane.Models public string DeletedBy { get; set; } public DateTime? DeletedOn { get; set; } public bool IsDeleted { get; set; } + public DateTime? SendOn { get; set; } } }