Open SilasStokes opened 1 year ago
hey there! did you happen to sort this out? If not I'll give a go
Hi yes I did - I never did a pr for it (my bad).
I can do a pr tonight but you want to patch your copy really quick I believe I have the changes in the repo of the project i used this package for, linked here: https://github.com/SilasStokes/pymessage_gpt_bot/tree/main/src/imessage_reader
SQL_CMD = (
"SELECT "
"text, "
"datetime((date / 1000000000) + 978307200, 'unixepoch', 'localtime'),"
"handle.id, "
"handle.service, "
"message.destination_caller_id, "
"message.is_from_me, "
"message.attributedBody, "
"message.cache_roomnames, "
"chat.display_name "
"FROM "
"message "
"LEFT JOIN "
"handle on message.handle_id=handle.ROWID "
"LEFT JOIN "
"chat ON message.cache_roomnames=chat.chat_identifier "
)```
Thank you, Silas!
After inspecting the database, I think this can be solved with a
LEFT JOIN
in the sql query. I'll make a pull request when I figure it out.