Problem
Users might want to subscribe to a site as a guest reader. If I subscribe to Bob's Site, I will be subscribed to all changes of his site. This is good, but I will ALSO be notified when somebody mentions Bob or replies to one of his comments. Meanwhile, I am not automatically subscribed to my own mentions and comments (this needs to be enabled separately!)
The email notification system currently does not know who the user is. As a result:
The Subscribe button always appears
Notif settings and subscriptions are not visible or editable in the app
We cannot sync your subscriptions to other devices where you are "logged in"
Solution
In the notification service DB, we will change the schema to associate emails and accounts.
We can bring back the system of signing requests using the local account or session key. The notification server is responsible for validating these signatures for reading and writing the notification settings for a certain account.
You will be automatically subscribed to your own account, but you can still disable/enable notifs for mentions, replies, or site content updates.
We will keep track of subscriptions for each account, as well as account-level notification settings such as email frequency and maybe filtering of notification types.
So the desktop app and web (once identity is linked) should show the same subscriptions!
Site Notes
what happens if two accounts subscribe to the same email??!? maybe this is just allowed no big deal, as long as the email token link has full ability to unsubscribe and manage notifs that go there
remember the email token needs an override toggle, because the email address recipient may be different from the account who is managing their subscriptions. so there should be some way for the email owner to say "I don't want this!" and stop receiving spam.
We should merge the concept of "subscription" and "subscription" 😂