Add conversation threads and prepare 0.6.0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -88,7 +88,9 @@ test('Android OpenPGP encrypts MIME attachments and decrypts with a recipient ke
|
||||
|
||||
const built = await sender.api.buildOutgoing({
|
||||
to: 'Bob <bob@example.test>', cc: '', subject: 'Secret note', text: 'hello from Android',
|
||||
messageId: '<test-message@example.test>', pgp: { encrypt: true, sign: true, passphrase: 'alice test passphrase' },
|
||||
messageId: '<test-message@example.test>', inReplyTo: '<parent@example.test>',
|
||||
references: '<root@example.test> <parent@example.test>',
|
||||
pgp: { encrypt: true, sign: true, passphrase: 'alice test passphrase' },
|
||||
attachments: [
|
||||
{ filename: 'note.txt', contentType: 'text/plain', contentBase64: Buffer.from('private attachment').toString('base64') },
|
||||
{ filename: 'charlie.asc', contentType: 'application/pgp-keys', contentBase64: Buffer.from(await thirdParty.api.exportPublic(charlie.key.fingerprint)).toString('base64') }
|
||||
@@ -97,6 +99,8 @@ test('Android OpenPGP encrypts MIME attachments and decrypts with a recipient ke
|
||||
assert.ok(built.rawBase64);
|
||||
saveMimeFixture('encrypted-signed', built.rawBase64);
|
||||
const raw = Buffer.from(built.rawBase64, 'base64').toString('utf8');
|
||||
assert.match(raw, /\r\nIn-Reply-To: <parent@example\.test>\r\n/);
|
||||
assert.match(raw, /\r\nReferences: <root@example\.test> <parent@example\.test>\r\n/);
|
||||
assert.match(raw, /multipart\/encrypted; protocol="application\/pgp-encrypted"/i);
|
||||
assert.doesNotMatch(raw, /hello from Android|private attachment/);
|
||||
recipient.setMessage({ rawBase64: built.rawBase64 });
|
||||
|
||||
Reference in New Issue
Block a user