Kept the unsent message with its chat (#1049)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-11 15:52:09 +02:00
1 parent 1c13300988
commit 468d28aa94
18 files changed
+1333 -240

No files matched your search

@@ -313,9 +313,8 @@ public sealed class MediaTranscriptionService(
? await WorkspaceBehaviour.CreateManagedTranscriptAsync(ownerChat!, mediaPath, result.Text)
: await ManagedTranscriptAttachment.CreateStagedAsync(mediaPath, result.Text);
if (persistentStorage is null && ownerChat is not null && attachment is ManagedTranscriptAttachment managed
&& ownerChat.PendingMediaTranscripts.All(existing => existing.FilePath != managed.FilePath))
ownerChat.PendingMediaTranscripts.Add(managed);
if (persistentStorage is null && ownerChat is not null && attachment is ManagedTranscriptAttachment managed)
ownerChat.Draft.AddAttachments([managed]);
if (isPersistedChat)
await WorkspaceBehaviour.StoreChatAsync(ownerChat!);