Skip to content

Commit

Permalink
Merge pull request #250 from ReagentX/feat/cs/fix-188
Browse files Browse the repository at this point in the history
Make `person_centric_id` optional
  • Loading branch information
ReagentX committed May 8, 2024
2 parents 88ff7cd + 550250d commit 024788d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
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

0 comments on commit 024788d

Please sign in to comment.