From 9b97ddc8d8b43f498b5d79e39a170955f3926fe1 Mon Sep 17 00:00:00 2001 From: jackyzy823 Date: Thu, 10 Mar 2022 21:24:57 +0800 Subject: [PATCH] Fix list members not displaying --- src/api.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api.nim b/src/api.nim index 708b72f..392795c 100644 --- a/src/api.nim +++ b/src/api.nim @@ -25,10 +25,9 @@ proc getGraphList*(id: string): Future[List] {.async.} = proc getGraphListMembers*(list: List; after=""): Future[Result[User]] {.async.} = if list.id.len == 0: return - let + var variables = %*{ "listId": list.id, - "cursor": after, "withSuperFollowsUserFields": false, "withBirdwatchPivots": false, "withDownvotePerspective": false, @@ -36,7 +35,9 @@ proc getGraphListMembers*(list: List; after=""): Future[Result[User]] {.async.} "withReactionsPerspective": false, "withSuperFollowsTweetFields": false } - url = graphListMembers ? {"variables": $variables} + if after.len > 0: + variables["cursor"] = % after + let url = graphListMembers ? {"variables": $variables} result = parseGraphListMembers(await fetchRaw(url, Api.listMembers), after) proc getListTimeline*(id: string; after=""): Future[Timeline] {.async.} =