Harden notifications: bump MailKit, bound webhook body, share truncation, skip soft-deleted members
This commit is contained in:
@@ -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]";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user