A number of small fixes for Link Previews

This commit is contained in:
Scott Nonnenberg 2019-01-31 09:53:11 -08:00
parent b26f6231d8
commit 0d7480bd92
4 changed files with 5 additions and 14 deletions

View file

@ -779,8 +779,10 @@
media
.filter(
attachment =>
(attachment && attachment.thumbnail) || attachment.message
attachment &&
(attachment.image || (!attachment.pending && !attachment.error))
)
.slice(0, 1)
.map(async attachment => {
const { fileName } = attachment;

View file

@ -1182,7 +1182,7 @@
urls.includes(item.url) &&
window.Signal.LinkPreviews.isLinkInWhitelist(item.url)
);
if (preview.length > incomingPreview.length) {
if (preview.length < incomingPreview.length) {
window.log.info(
`${message.idForLogging()}: Eliminated ${preview.length -
incomingPreview.length} previews with invalid urls'`