server: always enable push notifications #235
Loading…
Reference in a new issue
No description provided.
Delete branch "enable-push-notifs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The thing that previously presumably hindered this was that the VAPID keys had to be set up. Previously admins had to do this, but this is a bad idea for multiple reasons:
It looks like that migration might not be working properly: https://toot.site/@jeder/109382304525913598
7a82a3d262
to36c3e1ccc5
@ -0,0 +7,4 @@
// generate VAPID keys if not yet set
const keysSet = await queryRunner.query(`SELECT "swPublicKey" IS NOT NULL AND "swPrivateKey" IS NOT NULL as set FROM "meta"`);
// if there is no meta entry yet, the keys will be generated on initial setup
if (keysSet.length > 0 && !keysSet.set) {
This check should be
keysSet.length === 0
and the query should beOtherwise this doesn't get run and will result in a non-null constraint error.
Could also be possible to just do
36c3e1ccc5
to563f3672a9