@social-mail/social-mail-client 1.2.71 → 1.2.73
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.
- package/content/pwa/service-worker.js +3 -2
- package/dist/services/WebPushService.d.ts.map +1 -1
- package/dist/services/WebPushService.js +1 -21
- package/dist/services/WebPushService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +1 -21
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +1 -1
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/services/WebPushService.ts +2 -22
|
@@ -41532,28 +41532,8 @@ System.register(["tslib", "@web-atoms/core/dist/di/DITransient", "@web-atoms/cor
|
|
|
41532
41532
|
}
|
|
41533
41533
|
updateRegistration(s) {
|
|
41534
41534
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41535
|
-
const endpoint = s.endpoint;
|
|
41536
|
-
const expirationTime = s.expirationTime;
|
|
41537
|
-
const toHex = a => {
|
|
41538
|
-
let n = "";
|
|
41539
|
-
const u = new Uint8Array(a);
|
|
41540
|
-
for (const iterator of u) {
|
|
41541
|
-
n += iterator.toString(16).padStart(2, '0');
|
|
41542
|
-
}
|
|
41543
|
-
return n;
|
|
41544
|
-
};
|
|
41545
|
-
const p256dh = toHex(s.getKey("p256dh"));
|
|
41546
|
-
const auth = toHex(s.getKey("auth"));
|
|
41547
|
-
const json = {
|
|
41548
|
-
endpoint,
|
|
41549
|
-
expirationTime,
|
|
41550
|
-
keys: {
|
|
41551
|
-
p256dh,
|
|
41552
|
-
auth
|
|
41553
|
-
}
|
|
41554
|
-
};
|
|
41555
41535
|
const session = yield this.entityService.query(LoginSession, "currentUser").firstOrDefault();
|
|
41556
|
-
session.deviceToken = JSON.stringify(
|
|
41536
|
+
session.deviceToken = JSON.stringify(s);
|
|
41557
41537
|
session.deviceTokenType = "WebPush";
|
|
41558
41538
|
const cloner = this.entityService.cloner(session);
|
|
41559
41539
|
yield this.entityService.save(cloner.copy);
|