Allow stories to be embedded with link previews that do not have titles.

This commit is contained in:
Alex Hart
2024-11-21 10:39:26 -04:00
committed by Greyson Parrelli
parent c5674a37b5
commit 9e1f184994

View File

@@ -1181,7 +1181,7 @@ object DataMessageProcessor {
val validDomain = url.isPresent && LinkUtil.isValidPreviewUrl(url.get())
val isForCallLink = url.isPresent && CallLinks.isCallLink(url.get())
if ((hasTitle || isForCallLink) && (presentInBody || isStoryEmbed) && validDomain) {
if ((hasTitle || isForCallLink || isStoryEmbed) && (presentInBody || isStoryEmbed) && validDomain) {
val linkPreview = LinkPreview(url.get(), title.orElse(""), description.orElse(""), preview.date ?: 0, thumbnail.toOptional())
linkPreview
} else {