enable back link previews in sent message

pull/1387/head
Audric Ackermann 5 years ago
parent 1541b47f13
commit ef3f3d0af5
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -485,6 +485,7 @@ export class SessionCompositionBox extends React.Component<Props, State> {
return;
}
const { quotedMessageProps } = this.props;
const { stagedLinkPreview } = this.state;
// Send message
this.props.onMessageSending();
@ -502,7 +503,7 @@ export class SessionCompositionBox extends React.Component<Props, State> {
messagePlaintext,
attachments,
extractedQuotedMessageProps,
undefined,
[_.pick(stagedLinkPreview, 'url', 'image', 'title')],
null,
{}
);

@ -247,10 +247,7 @@ function handleLinkPreviews(
const urls = window.Signal.LinkPreviews.findLinks(messageBody);
const incomingPreview = messagePreview || [];
const preview = incomingPreview.filter(
(item: any) =>
(item.image || item.title) &&
urls.includes(item.url) &&
window.Signal.LinkPreviews.isLinkInWhitelist(item.url)
(item: any) => (item.image || item.title) && urls.includes(item.url)
);
if (preview.length < incomingPreview.length) {
window.log.info(

Loading…
Cancel
Save