diff options
| author | HJ <spam@hjkos.com> | 2018-12-25 11:33:00 +0000 |
|---|---|---|
| committer | HJ <spam@hjkos.com> | 2018-12-25 11:33:00 +0000 |
| commit | 0ad837846a3b833203bdae68fc6d3cb37c257c4b (patch) | |
| tree | 0901d0aedde172b1e4a6d89230906424870ee4e0 /src/modules/users.js | |
| parent | 2fe0af2af12c436d25f258eec21c149d773ec0d0 (diff) | |
| parent | 500b4bd37412960c7b2278b930794b2ccf00c971 (diff) | |
Merge branch 'push_fix' into 'develop'
Fixes for push notifications
Closes #235
See merge request pleroma/pleroma-fe!433
Diffstat (limited to 'src/modules/users.js')
| -rw-r--r-- | src/modules/users.js | 7 |
1 files changed, 6 insertions, 1 deletions
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')) |
