Link Previews
This commit is contained in:
parent
91ef39e482
commit
813924685e
36 changed files with 2298 additions and 134 deletions
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue