From ee9e510fc98cae973a7c8da782dfad1c86a6e9c3 Mon Sep 17 00:00:00 2001 From: Icaro Motta Date: Thu, 17 Aug 2023 16:00:54 -0300 Subject: [PATCH] Default to type LINK when converting to protobuf --- protocol/common/message.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/protocol/common/message.go b/protocol/common/message.go index 221d7644606..6cfd098054a 100644 --- a/protocol/common/message.go +++ b/protocol/common/message.go @@ -768,10 +768,8 @@ func isValidLinkPreviewForProto(preview LinkPreview) bool { switch preview.Type { case protobuf.UnfurledLink_IMAGE: return preview.URL != "" && isValidLinkPreviewThumbnail(preview.Thumbnail) - case protobuf.UnfurledLink_LINK: + default: // Validate as a link type by default. return preview.Title != "" && preview.URL != "" && isValidLinkPreviewThumbnail(preview.Thumbnail) - default: - return false } }