fix(email): preserve draft send identity
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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user