Always download link preview image

This commit is contained in:
Josh Perez 2023-01-06 19:55:12 -05:00 committed by GitHub
parent aa1f96cb6a
commit 235a188291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 29 deletions

View file

@ -2053,6 +2053,9 @@ export default class MessageReceiver
}
if (msg.textAttachment) {
// If a text attachment has a link preview we remove it from the
// textAttachment data structure and instead process the preview and add
// it as a "preview" property for the message attributes.
const { text, preview: unprocessedPreview } = msg.textAttachment;
if (unprocessedPreview) {
preview = processPreview([unprocessedPreview]);