mirror of
https://github.com/claunia/marechai.git
synced 2026-07-08 17:57:08 +00:00
- 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.
18 lines
649 B
C#
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; }
|
|
}
|