Ensure DocResult is included in envelope query handling

Set IncludeDocResult to true on the envelope in the query handler to guarantee the document result is included in responses. This prevents missing document data when processing envelope queries.
This commit is contained in:
2026-04-09 17:10:45 +02:00
parent 7e34f01f6a
commit f0f92c5400

View File

@@ -39,6 +39,7 @@ public class ReadSingleEnvelopeDocResultQueryHandler : IRequestHandler<ReadSingl
/// <returns></returns>
public async Task<byte[]> Handle(ReadSingleEnvelopeDocResultQuery request, CancellationToken cancellationToken)
{
request.Envelope.IncludeDocResult = true;
var result = await _mediator.Send(request.Envelope, cancellationToken);
return result.DocResult is byte[] docResult && docResult.Length > 0
? docResult