add service worker and push notifications
This commit is contained in:
parent
3fa9b39150
commit
09147cacea
4 changed files with 135 additions and 2 deletions
|
@ -2,6 +2,8 @@ import backendInteractorService from '../services/backend_interactor_service/bac
|
|||
import { compact, map, each, merge } from 'lodash'
|
||||
import { set } from 'vue'
|
||||
|
||||
import registerPushNotifications from '../services/push/push.js'
|
||||
|
||||
// TODO: Unify with mergeOrAdd in statuses.js
|
||||
export const mergeOrAdd = (arr, obj, item) => {
|
||||
if (!item) { return false }
|
||||
|
@ -125,6 +127,8 @@ const users = {
|
|||
// Fetch our friends
|
||||
store.rootState.api.backendInteractor.fetchFriends({id: user.id})
|
||||
.then((friends) => commit('addNewUsers', friends))
|
||||
|
||||
registerPushNotifications(store)
|
||||
})
|
||||
} else {
|
||||
// Authentication failed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue