@@ -141,6 +141,13 @@ func (s *TranscriptBatchService) submit(ctx context.Context, tx pgx.Tx, identity
|
||||
if retentionMode == "none" {
|
||||
return TranscriptBatchResponse{}, "", ErrTranscriptStorageNotAllowed
|
||||
}
|
||||
var nativePrimary bool
|
||||
if err := tx.QueryRow(ctx, `SELECT EXISTS(SELECT 1 FROM hardware_agent_session WHERE conversation_id=$1::uuid AND tenant_id=$2::uuid AND capability_snapshot->>'native_subtitle_primary'='true')`, internalID, identity.TenantID).Scan(&nativePrimary); err != nil {
|
||||
return TranscriptBatchResponse{}, "", err
|
||||
}
|
||||
if nativePrimary {
|
||||
return TranscriptBatchResponse{}, "", ErrConversationStateConflict
|
||||
}
|
||||
var hasConsentHistory, hasActiveConsent bool
|
||||
if err := tx.QueryRow(ctx, `
|
||||
SELECT
|
||||
|
||||
Reference in New Issue
Block a user