Refine Pandoc availability logging conditions

This commit is contained in:
Thorsten Sommer 2025-12-09 21:51:11 +01:00
parent 2562744bea
commit 602448246a
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -158,8 +158,11 @@ public sealed class ContentText : IContent
{
// Check Pandoc availability once before processing file attachments
var pandocState = await Pandoc.CheckAvailabilityAsync(Program.RUST_SERVICE, showMessages: true, showSuccessMessage: false);
if (!pandocState.IsAvailable || !pandocState.CheckWasSuccessful)
LOGGER.LogWarning("File attachments could not be processed because Pandoc is not available or the version check failed.");
if (!pandocState.IsAvailable)
LOGGER.LogWarning("File attachments could not be processed because Pandoc is not available.");
else if (!pandocState.CheckWasSuccessful)
LOGGER.LogWarning("File attachments could not be processed because the Pandoc version check failed.");
else
{
sb.AppendLine();