Harden notifications: bump MailKit, bound webhook body, share truncation, skip soft-deleted members

This commit is contained in:
Chris Chen
2026-06-23 19:29:23 -07:00
parent fd71f5a107
commit 5a915ebdd1
6 changed files with 44 additions and 8 deletions
@@ -47,3 +47,13 @@ public sealed record EmailMessage(
string HtmlBody,
IReadOnlyList<EmailAttachment>? Attachments = null,
string? SentByUserId = null);
/// <summary>Helpers for building NotificationLog rows consistently across channels.</summary>
public static class NotificationLogText
{
public const int BodyMaxLength = 8000;
/// <summary>Caps a body string so an oversized message can't bloat the log table.</summary>
public static string Truncate(string body) =>
body.Length <= BodyMaxLength ? body : body[..BodyMaxLength] + "…[truncated]";
}