raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.39k stars 3.09k forks source link

[Migadu] Shortcut to create random identities, similar to Apple's "Hide My Email" #14890

Closed LBBO closed 4 weeks ago

LBBO commented 1 month ago

Extension

https://www.raycast.com/xmok/migadu

Description

Apple has a "Hide My Email" feature that will generate a random, unique email that you can use to sign up for random services. Using Migadu's API and Identities, a similar functionality could be implemented without the dependency on Apple.

To this end, it would be useful to have a command that basically just takes the name of the identity you want to create (which would probably end up being the name of the service you're generating the email for) and then creates the identity and copies the new email address to your clipboard. I would suggest a dropdown that allows you to change the mailbox for which the identity is created, but I think it should be pre-populated with a pre-selected default mailbox. It might also be cool to allow for customization of the created identity, i.e. having an input that's prefilled with a random and unique email address.

Who will benefit from this feature?

Any migadu user who would like to use "Hide My Email", but without depending on Apple.

Anything else?

I'd be happy to implement this myself! All I need is the go-ahead that this feature would be appreciated. I've started looking into the code and saw that queries are currently handled via vanilla fetch. Would you mind if I migrate them to TanStack Query? This would remove the need for a manually managed isLoading state and enable some useful things in the future. Other extensions seem to also use this library, so I'm optimistic it won't cause any significant issues.

raycastbot commented 1 month ago

Thank you for opening this issue!

🔔 @xmok you might want to have a look.

💡 Author and Contributors commands The author and contributors of `xmok/migadu` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot close as not planned` Closes the issue as not planned. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue. - `@raycastbot keep this issue open` Make sure the issue won't go stale and will be kept open by the bot.
xmok commented 1 month ago

Sounds like a great idea. It's something that's actually in my backlog so I'd definitely appreciate you implementing it.

The ImprovMX extension does something similar in case you need inspiration.

There's no need for TanStack since Raycast Utils has a number of useful React Hooks. You could wrap the current calls in useCachedPromise or you could move it all to useFetch; the latter will allow you to remove the node-fetch dependency entirely.

Please let me know if you need further guidance.

Assigning the issue to you 🫡.