aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/config.js2
-rw-r--r--src/modules/users.js7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/config.js b/src/modules/config.js
index ccfd0190..c9528f6f 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -24,7 +24,7 @@ const defaultState = {
likes: true,
repeats: true
},
- webPushNotifications: true,
+ webPushNotifications: false,
muteWords: [],
highlight: {},
interfaceLanguage: browserLocale,
diff --git a/src/modules/users.js b/src/modules/users.js
index 13d3f26e..f2b59aaa 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -1,7 +1,7 @@
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'
import { compact, map, each, merge } from 'lodash'
import { set } from 'vue'
-import registerPushNotifications from '../services/push/push.js'
+import { registerPushNotifications, unregisterPushNotifications } from '../services/push/push.js'
import oauthApi from '../services/new_api/oauth'
import { humanizeErrors } from './errors'
@@ -116,6 +116,11 @@ const users = {
registerPushNotifications(isEnabled, vapidPublicKey, token)
},
+ unregisterPushNotifications (store) {
+ const token = store.state.currentUser.credentials
+
+ unregisterPushNotifications(token)
+ },
addNewStatuses (store, { statuses }) {
const users = map(statuses, 'user')
const retweetedUsers = compact(map(statuses, 'retweeted_status.user'))