Support live photos conversion#507
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR adds Live Photo media support by making TelegramFile.size nullable with a sizeValue() accessor, extending TelegramRequest.getFile() to extract LivePhoto and inline Video handling, updating photo selection to use sizeValue, and adding mocks and tests for Live Photo conversion and bot integration. ChangesLive Photo Media Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/java/com/github/stickerifier/stickerify/telegram/model/TelegramFile.java`:
- Around line 12-13: The canBeDownloaded() method in TelegramFile treats
negative sizes as downloadable; update TelegramFile.canBeDownloaded() to require
size to be non-null, non-negative, and <= MAX_DOWNLOADABLE_FILE_SIZE_IN_BYTES
(i.e., change the condition to include size >= 0). Ensure the check references
the existing size field and MAX_DOWNLOADABLE_FILE_SIZE_IN_BYTES constant so
negative values are rejected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b3b9d0a2-874d-4ba0-8a65-45562008f430
📒 Files selected for processing (6)
src/main/java/com/github/stickerifier/stickerify/telegram/model/TelegramFile.javasrc/main/java/com/github/stickerifier/stickerify/telegram/model/TelegramRequest.javasrc/test/java/com/github/stickerifier/stickerify/bot/MockResponses.javasrc/test/java/com/github/stickerifier/stickerify/bot/StickerifyTest.javasrc/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.javasrc/test/resources/valid_live_photo
d9655df to
ceb0e0d
Compare
Summary by CodeRabbit
New Features
Improvements
Tests