Responding to pull request review feedback
- messages.getQuoteObjectUrl: early return - backup.js: explaining variables for long if statement - types/messages.js: Log if thumbnail has neither data nor path - sendmessage.js: - remove extraneous logging - fix indentation - upload attachments and thumbnails in parallel - preload: don't load fs for tests, just fse - _conversation.scss: split two selectors into two lines, 0px -> 0 - backup_test.js: use fse.existsSync and comment twoSlashes regex - network_tests_view_test.js: Comment duplicate assignment to window.getSocketStatus
This commit is contained in:
parent
6ec6bf08c8
commit
c02860af5c
8 changed files with 34 additions and 18 deletions
|
@ -1030,8 +1030,11 @@ async function importConversation(db, dir, options) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((message.attachments && message.attachments.length) ||
|
||||
(message.quote && message.quote.attachments && message.quote.attachments.length)) {
|
||||
const hasAttachments = message.attachments && message.attachments.length;
|
||||
const hasQuotedAttachments = message.quote && message.quote.attachments &&
|
||||
message.quote.attachments.length > 0;
|
||||
|
||||
if (hasAttachments || hasQuotedAttachments) {
|
||||
const importMessage = async () => {
|
||||
const getName = attachmentsDir
|
||||
? _getAnonymousAttachmentFileName
|
||||
|
|
|
@ -274,6 +274,13 @@ exports.createAttachmentDataWriter = (writeExistingAttachmentData) => {
|
|||
|
||||
// we want to be bulletproof to thumbnails without data
|
||||
if (!data || !path) {
|
||||
console.log(
|
||||
'Thumbnail had neither data nor path.',
|
||||
'id:',
|
||||
message.id,
|
||||
'source:',
|
||||
message.source
|
||||
);
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue