Open danieldaquino opened 1 year ago
On Mon, Nov 13, 2023 at 10:53:31AM -0800, Daniel D’Aquino wrote:
Acceptance criteria:
- If the user logs out of their Nostr account, they should stop receiving push notifications from that account
- If the user logs into a new Nostr account, the push notification server should start sending that user notifications of that new account
Wouldn't you still want push notifications regardless of which account your logged into? We would just need account switching functionality so that damus can switch to the appropriate account.
Although we would probably need per-user notification settings to control this.
Wouldn't you still want push notifications regardless of which account your logged into? We would just need account switching functionality so that damus can switch to the appropriate account.
That would make sense if the user manages more than one account at the same time.
I was imagining use-cases where the user temporarily logs into their account on their friend's or family member's device, or someone who created an account but wants to switch to a new one (and "abandon" the old one).
Besides, I imagine that some of the other push notification functionality (e.g. decryption of DMs in push notifications) would only work for the user that is logged in.
However, you pointed out a useful use case. I imagine this would be better managed if we have multi-user support (similar to how Google allows someone to login to multiple accounts from the same browser), because then the user can control whether they want to be logged into 2 accounts, or if they specifically want to logout of their account.
On Mon, Nov 13, 2023 at 02:07:07PM -0800, Daniel D’Aquino wrote:
I was imagining use-cases where the user temporarily logs into their account on their friend's or family member's device, or someone who created an account but wants to switch to a new one (and "abandon" the old one).
good point. I wonder how most apps handle this, probably on logout like you mentioned...
Customer feedback:
Hey weird bug. I enabled push notifications. Then logged out and signed into a different npub. But later I received a push notification for the first account. I checked iCloud but didn't see any stored data for Damus. Is there somewhere else that app cache could have held onto causing previously logged in account to still trigger a notification? Thanks
@jb55 @alltheseas I have the basic idea of the solution on the back of my mind, so I decided to quickly create a rough draft of what the solution might look like: https://github.com/damus-io/damus/pull/2644
That draft PR is completely untested, and I haven't really addressed edge cases, but I added the draft to help whoever is going to work on this (whether that's future me or someone else)
@jb55 @alltheseas I have the basic idea of the solution on the back of my mind, so I decided to quickly create a rough draft of what the solution might look like: #2644
That draft PR is completely untested, and I haven't really addressed edge cases, but I added the draft to help whoever is going to work on this (whether that's future me or someone else)
To be clear, I am not actively working on this, I just wrote that draft because it was on my mind and so I thought it might help to have this draft around for when someone gets to work on this.
Acceptance criteria: