@social-mail/social-mail-client 1.0.120 → 1.0.122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,4 +53,9 @@ self.addEventListener('fetch', function (event) {
53
53
  );
54
54
  })
55
55
  );
56
+ });
57
+
58
+ self.addEventListener("push", function(event) {
59
+ const { title } = JSON.parse(event.data.text());
60
+ event.waitUntil(self.registration.showNotification(title));
56
61
  });
@@ -13807,7 +13807,9 @@ System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/cor
13807
13807
  if (permission !== "granted") {
13808
13808
  return;
13809
13809
  }
13810
- const s = yield r.pushManager.subscribe();
13810
+ const s = yield r.pushManager.subscribe({
13811
+ userVisibleOnly: true
13812
+ });
13811
13813
  return s;
13812
13814
  });
13813
13815
  }
@@ -13825,6 +13827,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/cor
13825
13827
  auth
13826
13828
  }
13827
13829
  };
13830
+ console.log(json);
13828
13831
  const session = yield this.entityService.query(LoginSession, "currentUser").firstOrDefault();
13829
13832
  session.deviceToken = JSON.stringify(json);
13830
13833
  session.deviceTokenType = "WebPush";