mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 10:58:19 +01:00
New option: Disable automatic attachment downloads
This commit is contained in:
@@ -181,7 +181,7 @@ describe('processDataMessage', () => {
|
||||
assert.strictEqual(out.profileKey, 'Khc3');
|
||||
});
|
||||
|
||||
it('should process quote', () => {
|
||||
it('should process quote, dropping second attachment', () => {
|
||||
const out = check({
|
||||
quote: {
|
||||
id: Long.fromNumber(1),
|
||||
@@ -190,7 +190,12 @@ describe('processDataMessage', () => {
|
||||
attachments: [
|
||||
{
|
||||
contentType: 'image/jpeg',
|
||||
fileName: 'image.jpg',
|
||||
fileName: 'image1.jpg',
|
||||
thumbnail: UNPROCESSED_ATTACHMENT,
|
||||
},
|
||||
{
|
||||
contentType: 'image/jpeg',
|
||||
fileName: 'image2.jpg',
|
||||
thumbnail: UNPROCESSED_ATTACHMENT,
|
||||
},
|
||||
],
|
||||
@@ -204,7 +209,7 @@ describe('processDataMessage', () => {
|
||||
attachments: [
|
||||
{
|
||||
contentType: IMAGE_JPEG,
|
||||
fileName: 'image.jpg',
|
||||
fileName: 'image1.jpg',
|
||||
thumbnail: PROCESSED_ATTACHMENT,
|
||||
},
|
||||
],
|
||||
@@ -213,7 +218,7 @@ describe('processDataMessage', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should process contact', () => {
|
||||
it('should process contact, dropping second contact', () => {
|
||||
const out = check({
|
||||
contact: [
|
||||
{
|
||||
@@ -234,8 +239,36 @@ describe('processDataMessage', () => {
|
||||
{
|
||||
avatar: { avatar: PROCESSED_ATTACHMENT, isProfile: false },
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it('should process preview, dropping second preview', () => {
|
||||
const out = check({
|
||||
preview: [
|
||||
{
|
||||
description:
|
||||
'Say "hello" to a different messaging experience. An unexpected focus on privacy, combined with all of the features you expect.',
|
||||
image: UNPROCESSED_ATTACHMENT,
|
||||
title: 'Signal Private Messenger #1',
|
||||
url: 'https://signal.org',
|
||||
},
|
||||
{
|
||||
description: 'Say "hello" again',
|
||||
image: UNPROCESSED_ATTACHMENT,
|
||||
title: 'Signal Private Messenger #2',
|
||||
url: 'https://signal.org',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
assert.deepStrictEqual(out.preview, [
|
||||
{
|
||||
avatar: { avatar: PROCESSED_ATTACHMENT, isProfile: true },
|
||||
date: undefined,
|
||||
description:
|
||||
'Say "hello" to a different messaging experience. An unexpected focus on privacy, combined with all of the features you expect.',
|
||||
image: PROCESSED_ATTACHMENT,
|
||||
title: 'Signal Private Messenger #1',
|
||||
url: 'https://signal.org',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user