chore: Update translations

This commit is contained in:
2023-09-24 12:36:51 +00:00
parent 0e9ca7e2e3
commit 9f731da5be
10 changed files with 101 additions and 77 deletions

View File

@ -277,7 +277,7 @@ export class EventPublisher {
*/
async decryptGeneric(content: string, from: string) {
const pl = decodeEncryptionPayload(content);
switch(pl.v) {
switch (pl.v) {
case MessageEncryptorVersion.Nip4: {
const nip4Payload = `${base64.encode(pl.ciphertext)}?iv=${base64.encode(pl.nonce)}`;
return await this.#signer.nip4Decrypt(nip4Payload, from);

View File

@ -158,4 +158,4 @@ export function decodeEncryptionPayload(p: string) {
export function encodeEncryptionPayload(p: MessageEncryptorPayload) {
return base64.encode(new Uint8Array([p.v, ...p.nonce, ...p.ciphertext]));
}
}