squatto/alfred-imessage-2fa

Limit to <15 min?

luckman212 opened this issue · 4 comments

Amazingly useful workflow !! I didn't even know the iMessage db was just a simple sqlite that could be queried. Bravo for this.

One thing, I notice that it's pulling in 2FA codes from months ago in my chats.

It'd be useful to limit the search results to just the last XX minutes (10 min, 15 min, maybe 24h max?) since codes older than that are likely useless anyway.

I might look at the code later and see if I can make a PR for this.

I think that's a great idea, thank you! I implemented it and made the default 15 minutes. You can change the number of minutes by changing a workflow variable.

You can download the updated version here: https://github.com/squatto/alfred-imessage-2fa/releases/download/v1.2.5/iMessage.2FA.alfredworkflow

Thanks again!

Also...thank you very much for the kind words. I appreciate it! Once I realized that you can read the messages database, I knew that I had to do something with it. This was definitely scratching my own itch, but come to find out, it's an itch that bugs us all 😂

If you're curious about the messages database, google "chat.db sqlite" and you'll find a bunch of great examples of what you can do. The database schema is really strange IMO but once you're past that hurdle then it's fun to play around with. Here are some good ones to start with:

Thanks again!

Wow, great! I wasn't expecting this to be done so fast. This has quickly become one of my most-often-used workflows. 🎉

And I will definitely take a look at those links, very interesting stuff.

That makes me super happy to hear! I'm glad that you find it so useful 😁