Unless we need to return an unsubscribe function from onMount, we can just make the closure async and avoid the define/call function pattern.
$notificationSettings. But don't actually check this, we want to turn these on here; this guard will make this function a no-op.
All of this should be handled by the push adapters. This should be as simple as calling Push.request() below.
notificationSettings.update would be more idiomatic here
This can't default to true, because push is only true if we've successfully requested permissions.
this is unnecessary, deletes are already in roomMetaEventsByUrl right?
Also badly named, because this only enables messaging notifications. Just inline all this logic.
Put this in a script context="module" in the component where it's used.
Never re-export, always update imports
This is very badly named, because it checks messages specifically. That logic should be inlined, this should only check push/token/permission. This should also live in push, not notifications (which handles badges/checked state).
I don't think we need the modal component, just do: