Fixed chats being stored when chats are stored manually or workspaces are disabled (#1145)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-31 18:54:20 +01:00
1 parent 9532664a25
commit 64dc621a7d
12 files changed
+415 -71

No files matched your search

@@ -314,9 +314,15 @@ public sealed class MediaTranscriptionService(
continue;
}
//
// Only while chats are stored automatically, the transcript goes right into a stored chat,
// which is stored along with it. Otherwise, storing would put whatever the user did not save
// on the disk, so the transcript waits in the staging area until the user saves the chat:
//
var persistentStorage = transcriptStorages.FirstOrDefault(storage => storage.CanStore(target.Owner));
var isPersistedChat = persistentStorage is null &&
ownerChat is not null &&
settingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY &&
WorkspaceBehaviour.IsChatExisting(new LoadChat(ownerChat.WorkspaceId, ownerChat.ChatId));
var attachment = persistentStorage is not null