mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-22 18:55:41 +00:00
Apply cached profile verified status to tweets
This commit is contained in:
parent
72d8f35cd1
commit
59a72831c7
|
@ -66,13 +66,17 @@ proc fetchProfile*(after: string; query: Query; skipRail=false;
|
||||||
if result.user.protected or result.user.suspended:
|
if result.user.protected or result.user.suspended:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not skipPinned and query.kind == posts and
|
if query.kind == posts:
|
||||||
result.user.pinnedTweet > 0 and after.len == 0:
|
if result.user.verified:
|
||||||
let tweet = await getCachedTweet(result.user.pinnedTweet)
|
for chain in result.tweets.content:
|
||||||
if not tweet.isNil:
|
if chain[0].user.id == result.user.id:
|
||||||
tweet.pinned = true
|
chain[0].user.verified = true
|
||||||
tweet.user = result.user
|
if not skipPinned and result.user.pinnedTweet > 0 and after.len == 0:
|
||||||
result.pinned = some tweet
|
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;
|
proc showTimeline*(request: Request; query: Query; cfg: Config; prefs: Prefs;
|
||||||
rss, after: string): Future[string] {.async.} =
|
rss, after: string): Future[string] {.async.} =
|
||||||
|
|
Loading…
Reference in a new issue