|
|
@ -237,19 +237,6 @@ export const generateSaveAndActivateIdentity = async (): Promise<string> => { |
|
|
|
return newId.did; |
|
|
|
}; |
|
|
|
|
|
|
|
function getBase64(subscription: PushSubscription, key: PushEncryptionKeyName) { |
|
|
|
const buffer = subscription.getKey(key); |
|
|
|
if (!buffer) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
const value = Buffer.from(buffer); |
|
|
|
return value |
|
|
|
.toString("base64") |
|
|
|
.replace(/\+/g, "-") |
|
|
|
.replace(/\//g, "_") |
|
|
|
.replace(/=+$/, ""); |
|
|
|
} |
|
|
|
|
|
|
|
export const sendTestThroughPushServer = async ( |
|
|
|
subscriptionJSON: PushSubscriptionJSON, |
|
|
|
skipFilter: boolean, |
|
|
|