Harmonized filenames with Android version (#4324)
The Android app saves files with the filename format 'signal-YYYY-MM-DD-hhmmss.extension' but the desktop version saves them with format 'signal-attachment-YYYY-MM-DD-hhmmss.extension'. The attachment changes the suggested filename in Attachment.ts to have the prefix 'signal' rather than 'signal-attachment'. Tests were changed as necessary. Resolves #4321
This commit is contained in:
parent
66aa6f142a
commit
7b5fe0cdbf
2 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ describe('Attachment', () => {
|
||||||
attachment,
|
attachment,
|
||||||
timestamp,
|
timestamp,
|
||||||
});
|
});
|
||||||
const expected = 'signal-attachment-1970-01-01-000000.mov';
|
const expected = 'signal-1970-01-01-000000.mov';
|
||||||
assert.strictEqual(actual, expected);
|
assert.strictEqual(actual, expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -65,7 +65,7 @@ describe('Attachment', () => {
|
||||||
timestamp,
|
timestamp,
|
||||||
index: 3,
|
index: 3,
|
||||||
});
|
});
|
||||||
const expected = 'signal-attachment-1970-01-01-000000_003.mov';
|
const expected = 'signal-1970-01-01-000000_003.mov';
|
||||||
assert.strictEqual(actual, expected);
|
assert.strictEqual(actual, expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -374,7 +374,7 @@ export const getSuggestedFilename = ({
|
||||||
return attachment.fileName;
|
return attachment.fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const prefix = 'signal-attachment';
|
const prefix = 'signal';
|
||||||
const suffix = timestamp
|
const suffix = timestamp
|
||||||
? moment(timestamp).format('-YYYY-MM-DD-HHmmss')
|
? moment(timestamp).format('-YYYY-MM-DD-HHmmss')
|
||||||
: '';
|
: '';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue