diff --git a/src/components/compose.jsx b/src/components/compose.jsx index d9fa4c6d..a090873d 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -699,6 +699,17 @@ function Compose({ } // TODO: check for URLs and use `charactersReservedPerUrl` to calculate max characters + if (mediaAttachments.length > 0) { + // If there are media attachments, check if they have no descriptions + const noDescription = mediaAttachments.some( + (media) => !media.description?.trim(), + ); + if (noDescription) { + const yes = confirm('Some media have no descriptions. Continue?'); + if (!yes) return; + } + } + // Post-cleanup spoilerText = (sensitive && spoilerText) || undefined; status = status === '' ? undefined : status; diff --git a/src/components/status.jsx b/src/components/status.jsx index d544d2f5..a2f78172 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -271,7 +271,15 @@ function Status({ } try { if (!reblogged) { - const yes = confirm('Boost this post?'); + // Check if media has no descriptions + const hasNoDescriptions = mediaAttachments.some( + (attachment) => !attachment.description?.trim?.(), + ); + let confirmText = 'Boost this post?'; + if (hasNoDescriptions) { + confirmText += '\n\n⚠️ Some media have no descriptions.'; + } + const yes = confirm(confirmText); if (!yes) { return; }