Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make person_centric_id optional #250

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Documentation for the library is located [here](imessage-database/README.md).

### Supported Features

This crate supports every iMessage feature as of macOS 14.3.1 (23D60) and iOS 17.3.1 (21D61):
This crate supports every iMessage feature as of macOS 14.4.1 (23E224) and iOS 17.4.1 (21E236):

- Multi-part messages
- Replies/Threads
Expand Down
18 changes: 10 additions & 8 deletions imessage-database/src/tables/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,20 @@ impl Diagnostic for Handle {
"FROM handle ",
"WHERE person_centric_id NOT NULL"
);
let mut rows = db.prepare(query).map_err(TableError::Messages)?;
let count_dupes: Option<i32> = rows
.query_row([], |r| r.get(0))
.map_err(TableError::Handle)?;

done_processing();
if let Ok(mut rows) = db.prepare(query).map_err(TableError::Handle) {
let count_dupes: Option<i32> = rows
.query_row([], |r| r.get(0))
.map_err(TableError::Handle)?;

if let Some(dupes) = count_dupes {
if dupes > 0 {
println!("\rContacts with more than one ID: {dupes}");
if let Some(dupes) = count_dupes {
if dupes > 0 {
println!("\rContacts with more than one ID: {dupes}");
}
}
}

done_processing();
Ok(())
}
}
Expand Down
Loading