Files
marechai/Marechai.Data/Models/UpdateNotificationPreferencesRequest.cs
Natalia Portillo 1a54709914 Add email notification for new messages
- Introduced NewMessageEmail.cshtml and NewMessageEmailModel.cs for email template and model.
- Implemented endpoints in AuthController for retrieving and updating user notification preferences.
- Enhanced MessagesController to queue email notifications for new messages.
- Added LastLanguageCaptureMiddleware to capture user's language preferences.
- Created MessageNotificationQueue and MessageNotificationWorker to handle email sending in the background.
- Updated Profile.razor and Profile.razor.cs to manage notification preferences in the user profile.
- Localized new strings for notification preferences in multiple languages.
- Updated AuthService to handle fetching and updating notification preferences.
- Modified HttpAuthHandler to forward user's current UI culture for localization.
2026-05-15 01:02:21 +01:00

18 lines
649 B
C#

using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Marechai.Data.Models;
/// <summary>
/// Request body for <c>PUT /auth/me/notification-preferences</c>. Carries the same fields as
/// <see cref="NotificationPreferencesDto" /> but as a separate type so future preference additions
/// (digest cadence, quiet hours, etc.) can default-allocate cleanly server-side without expanding the
/// read-side DTO.
/// </summary>
public sealed record UpdateNotificationPreferencesRequest
{
[Required]
[JsonPropertyName("notifyOnNewMessage")]
public bool NotifyOnNewMessage { get; set; }
}