iOS/Android Push Notifications on Self-Hosted Discourse (Docker)

It’s to prevent the odd case where you don’t want push notifications to go out to logged out devices. You’re on a device with push notifications turned on, but you’re done, so you log out.

Then someone later then sends you a sensitive message over PM. A push notification goes out to all registered devices. The device in which you logged out is still technically registered so it still receives the full preview of your notification. Oops.

I played it safe on its initial push by just wiping all keys which is obviously overkill and annoying. Perhaps we should start associating the push notification subscriptions to a specific user session or somehow confirm that the expected user is still logged in instead?

1 Like