Merge branch 'post-messages-with-unreadable-attachments' into bound-attachment-previews

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bj8KnxpTf9sj2Ysa8aLAVa
This commit is contained in:
Marcello CostagliolaandClaude Opus 5.5 committed 2026-10-06 15:20:56 +02:00
commit 91036c5085
3 files changed
+36

No files matched your search

+3
View File
@@ -30,6 +30,7 @@ module Message::Attachment
attachment&.analyze
end
# A file that ffmpeg or libvips can't decode is still the message: post it without a preview.
def process_attachment_thumbnail
case
when attachment.video?
@@ -37,5 +38,7 @@ module Message::Attachment
when attachment.representable?
attachment.representation(:thumb).processed
end
rescue ActiveStorage::PreviewError, Vips::Error => error
Rails.logger.warn "Posted #{attachment.filename} without a preview: #{error.class}: #{error.message.lines.first&.chomp}"
end
end