fix(email): preserve draft send identity
CI and Deploy / test (pull_request) Successful in 4m15s
CI and Deploy / deploy (pull_request) Has been skipped

Persist and export each draft's idempotency UUID so refresh and edits cannot create a fresh delivery identity. Add reversible provider-specific migration SQL.
This commit is contained in:
cesnimda
2026-08-10 10:11:04 +02:00
parent 108440d361
commit 80b5532c2f
12 changed files with 2778 additions and 4 deletions
@@ -62,6 +62,7 @@ public sealed class BackupControllerTests
Subject = "Synthetic export subject",
BodyText = "Synthetic readable draft body.",
ThreadId = "synthetic-thread",
ClientRequestId = "00000000-0000-4000-8000-000000000123",
Revision = 3,
CreatedAtUtc = DateTime.UtcNow.AddMinutes(-5),
UpdatedAtUtc = DateTime.UtcNow,
@@ -75,6 +76,7 @@ public sealed class BackupControllerTests
To = "other@example.test",
Subject = "Other tenant subject",
BodyText = "Other tenant private body.",
ClientRequestId = "00000000-0000-4000-8000-000000000456",
CreatedAtUtc = DateTime.UtcNow,
UpdatedAtUtc = DateTime.UtcNow,
});
@@ -102,6 +104,7 @@ public sealed class BackupControllerTests
Assert.Equal("Synthetic export subject", draft.GetProperty("Subject").GetString());
Assert.Equal("Synthetic readable draft body.", draft.GetProperty("BodyText").GetString());
Assert.Equal("synthetic-thread", draft.GetProperty("ThreadId").GetString());
Assert.Equal("00000000-0000-4000-8000-000000000123", draft.GetProperty("ClientRequestId").GetString());
Assert.Equal(3, draft.GetProperty("Revision").GetInt64());
}