Support quotes in pinned tweets

This commit is contained in:
Zed 2022-01-23 10:15:54 +01:00
parent d1a3e7ab58
commit 182b5ba90b
1 changed files with 3 additions and 0 deletions

View File

@ -376,6 +376,9 @@ proc parseStatus*(js: JsonNode): Tweet =
if not result.isNil:
result.user = parseUser(js{"user"})
with quote, js{"quoted_status"}:
result.quote = some parseStatus(js{"quoted_status"})
proc parseInstructions[T](res: var Result[T]; global: GlobalObjects; js: JsonNode) =
if js.kind != JArray or js.len == 0:
return