-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
[Messages V2] Migrate data layer #4036
Comments
Description updated after chat with @mariojsnunes |
could we store the user email in the profiles table now? (since it's no longer exposed to the frontend) |
@mariojsnunes Yes! I'm still not back into SQL thinking and should be joining. I think the email address should stay in the auth record though. e.g. something like this for the data the email service would need:
Though of course that then makes the auth work a dependency of this. Maybe unavoidable. |
Blocked until auth is done. |
Context
On profiles atm, messages can be sent to spaces.
Goal
Replace steps 2-5 with supabase and related tools.
New workflow
functions/src/messages/messages.ts
take place.Schema
Current -> new
_id -> id
_created -> created_at
email -> sender_email
name? -> sender_name?
text -> message_body
toUserName -> receiver_user_name
(new) -> receiver_email
isSent -> status
What email service to use
I believe it makes sense to use Resend. Lots of services could do this for us, the advantage of resend is that it's a great option for the auth email service as it has a great intergration with supabase. It'll cost a flat $20 a month for everything we'll end up needing.
The text was updated successfully, but these errors were encountered: