From 54ba1e30b5b0be36c36c8de1626c4bed6d7f82ff Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 5 Feb 2025 20:27:23 +0100 Subject: [PATCH] Fix empty image URLs in photo rail --- src/parser.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parser.nim b/src/parser.nim index 4bdb1e2..6e0be73 100644 --- a/src/parser.nim +++ b/src/parser.nim @@ -456,7 +456,8 @@ proc parseGraphPhotoRail*(js: JsonNode): PhotoRail = elif t.card.isSome: get(t.card).image else: "" - result.add GalleryPhoto(url: url, tweetId: $t.id) + if url.len > 0: + result.add GalleryPhoto(url: url, tweetId: $t.id) if result.len == 16: break