Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
izuru775 committed Oct 5, 2021
1 parent 3f76b7a commit 7873411
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions public/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ self.addEventListener("push", e => {
console.log("inside push", data)
console.log("Push Recieved...");
var action;
if (data._id){
if (data.isExpert){
action = "/users/experts/myMembers"
}
else {
Expand Down Expand Up @@ -76,17 +76,27 @@ self.addEventListener("notificationclick", e => {
console.log('Request failure: ', error);
})
)
console.log(`${self.location.origin}${e.notification.actions[0].action}`)
notification.close();

clients.openWindow("https://www.saife.app/users/experts/myMembers");
}else{
console.log(`${self.location.origin}${e.notification.actions[0].action}`)
notification.close();

clients.openWindow("https://www.saife.app/users/myMembers");
}

// console.log(`${self.location.origin}${e.action}`)
// notification.close();

// clients.openWindow(`${self.location.origin}${e.action}`);

console.log(`${self.location.origin}${e.notification.actions[0].action}`)
notification.close();
// console.log(`${self.location.origin}${e.notification.actions[0].action}`)
// notification.close();

// clients.openWindow(`${self.location.origin}${e.notification.actions[0].action}`);

clients.openWindow(`${self.location.origin}${e.notification.actions[0].action}`);
});

self.addEventListener('pushsubscriptionchange', function(event) {
Expand Down

0 comments on commit 7873411

Please sign in to comment.