From 7520e24e9287e214dd31224f1201e9b6385fd567 Mon Sep 17 00:00:00 2001 From: sct Date: Tue, 18 May 2021 19:52:23 +0900 Subject: [PATCH] fix(notifications): default webpush notification agent to enabled for users for settings response closes #1663 --- server/routes/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/index.ts b/server/routes/index.ts index 72e396c5..e99ab3da 100644 --- a/server/routes/index.ts +++ b/server/routes/index.ts @@ -84,7 +84,7 @@ router.use('/user', isAuthenticated(), user); router.get('/settings/public', async (req, res) => { const settings = getSettings(); - if (!req.user?.settings?.notificationTypes.webpush) { + if (!(req.user?.settings?.notificationTypes.webpush ?? true)) { return res .status(200) .json({ ...settings.fullPublicSettings, enablePushRegistration: false });