Fix null legacy tweet crash

Fixes #1383
This commit is contained in:
Zed
2026-03-21 18:59:05 +01:00
parent fea6f59005
commit 3429667414
+1 -1
View File
@@ -314,7 +314,7 @@ proc parseCard(js: JsonNode; urls: JsonNode): Card =
proc parseTweet(js: JsonNode; jsCard: JsonNode = newJNull(); proc parseTweet(js: JsonNode; jsCard: JsonNode = newJNull();
replyId: int64 = 0): Tweet = replyId: int64 = 0): Tweet =
if js.isNull: return if js.isNull: return Tweet()
let time = let time =
if js{"created_at"}.notNull: js{"created_at"}.getTime if js{"created_at"}.notNull: js{"created_at"}.getTime