Use legacy timeline/user endpoint for Tweets tab
This commit is contained in:
@@ -53,7 +53,7 @@ proc fetchProfile*(after: string; query: Query; skipRail=false;
|
||||
|
||||
result =
|
||||
case query.kind
|
||||
# of posts: await getTimeline(userId, after)
|
||||
of posts: await getUserTimeline(userId, after)
|
||||
of replies: await getGraphUserTweets(userId, TimelineKind.replies, after)
|
||||
of media: await getGraphUserTweets(userId, TimelineKind.media, after)
|
||||
else: Profile(tweets: await getTweetSearch(query, after))
|
||||
@@ -63,21 +63,6 @@ proc fetchProfile*(after: string; query: Query; skipRail=false;
|
||||
|
||||
result.tweets.query = query
|
||||
|
||||
if result.user.protected or result.user.suspended:
|
||||
return
|
||||
|
||||
if query.kind == posts:
|
||||
if result.user.verified:
|
||||
for chain in result.tweets.content:
|
||||
if chain[0].user.id == result.user.id:
|
||||
chain[0].user.verified = true
|
||||
if not skipPinned and result.user.pinnedTweet > 0 and after.len == 0:
|
||||
let tweet = await getCachedTweet(result.user.pinnedTweet)
|
||||
if not tweet.isNil:
|
||||
tweet.pinned = true
|
||||
tweet.user = result.user
|
||||
result.pinned = some tweet
|
||||
|
||||
proc showTimeline*(request: Request; query: Query; cfg: Config; prefs: Prefs;
|
||||
rss, after: string): Future[string] {.async.} =
|
||||
if query.fromUser.len != 1:
|
||||
|
||||
Reference in New Issue
Block a user