mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Link Previews
This commit is contained in:
12
app/sql.js
12
app/sql.js
@@ -1569,7 +1569,7 @@ async function getMessagesWithFileAttachments(conversationId, { limit }) {
|
||||
}
|
||||
|
||||
function getExternalFilesForMessage(message) {
|
||||
const { attachments, contact, quote } = message;
|
||||
const { attachments, contact, quote, preview } = message;
|
||||
const files = [];
|
||||
|
||||
forEach(attachments, attachment => {
|
||||
@@ -1607,6 +1607,16 @@ function getExternalFilesForMessage(message) {
|
||||
});
|
||||
}
|
||||
|
||||
if (preview && preview.length) {
|
||||
forEach(preview, item => {
|
||||
const { image } = item;
|
||||
|
||||
if (image && image.path) {
|
||||
files.push(image.path);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user