Move to central MIME functions, remove some console.log

And generally address PR feedback.
This commit is contained in:
Scott Nonnenberg 2018-04-12 19:02:20 -07:00
parent f255cbcbe3
commit fce9bb7342
No known key found for this signature in database
GPG key ID: 5F82280C35134661
6 changed files with 21 additions and 17 deletions

View file

@ -1137,13 +1137,11 @@
// Maybe in the future we could try to pull thumbnails video ourselves,
// but for now we will rely on incoming thumbnails only.
console.log({ first, contentType: first ? first.contentType : null });
if (!first || !MIME.isImage(first.contentType)) {
return;
}
const quotedAttachments = quotedMessage.get('attachments') || [];
console.log({ quotedMessage, quotedAttachments });
if (quotedAttachments.length === 0) {
return;
}
@ -1155,7 +1153,6 @@
// Note: it would be nice to take the full-size image and downsample it into
// a true thumbnail here.
quotedMessage.updateImageUrl();
console.log({ quotedMessage });
},
async loadQuoteThumbnail(message) {
const { quote } = message.attributes;