backend notifications implementation

This commit is contained in:
Čarodej
2022-03-10 11:49:02 +01:00
parent 70d7f2f5bd
commit 64e80d387b
20 changed files with 617 additions and 280 deletions

View File

@@ -3,14 +3,15 @@ const defaultState = {
}
const actions = {
runConnection: ({ commit, getters }) => {
runConnection: ({ commit, getters, dispatch }) => {
commit('SET_RUNNING_COMMUNICATION')
Echo.private(`test.${getters.user.data.id}`)
.listen('.Domain\\Notifications\\Events\\TestUpdate', (e) => {
console.log(e);
});
Echo.private(`App.Users.Models.User.${getters.user.data.id}`)
.notification(() => {
// TODO: call sound
dispatch('getAppData')
});
},
}