Skip to content

Conversation

@ReagentX
Copy link
Owner

@ReagentX ReagentX self-assigned this Dec 11, 2025
@ReagentX ReagentX added crate: cli Related to the CLI crate enhancement Requires updating an existing feature labels Dec 11, 2025
@ReagentX ReagentX requested a review from Copilot December 11, 2025 20:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for older iMessage database versions by implementing backward compatibility for two key features:

  1. Timestamp Format Detection: Older databases store timestamps as seconds since 2001-01-01, while newer databases use nanoseconds. The code now auto-detects the format based on a threshold value.
  2. Translation Feature Compatibility: The translation caching feature (introduced in iOS 16+) is made optional by suppressing errors when the message_summary_info column is unavailable in older databases.
  3. Contact Lookup Refactoring: Minor cleanup to remove an unnecessary else block in the contact lookup logic.

Key changes:

  • Added automatic detection of timestamp format (seconds vs nanoseconds) to handle older database versions
  • Made translation caching fault-tolerant by using unwrap_or_default() for older databases without translation support
  • Refactored contact lookup code to remove redundant else block

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
imessage-exporter/src/app/runtime.rs Changed error handling for translation caching to use unwrap_or_default() for backward compatibility
imessage-exporter/src/app/contacts.rs Removed unnecessary else block in contact lookup logic
imessage-database/src/util/dates.rs Added timestamp format auto-detection logic and comprehensive test coverage
imessage-database/src/tables/messages/message.rs Updated documentation to clarify iOS 16+ requirement for translation features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ReagentX ReagentX merged commit 46d6587 into develop Dec 11, 2025
7 checks passed
@ReagentX ReagentX deleted the feat/cs/older-db-compatibility branch December 11, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crate: cli Related to the CLI crate enhancement Requires updating an existing feature

Projects

Development

Successfully merging this pull request may close these issues.

2 participants