mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
parent
23f87c115a
commit
f3d6f53f6d
4 changed files with 20 additions and 21 deletions
|
|
@ -30,20 +30,13 @@ proc fetchTimeline*(after: string; query: Query; skipRail=false):
|
|||
|
||||
if profileId.len == 0:
|
||||
profile = await getCachedProfile(name)
|
||||
profileId = if profile.suspended: "s"
|
||||
else: profile.id
|
||||
|
||||
if profileId.len > 0:
|
||||
await cacheProfileId(profile.username, profileId)
|
||||
|
||||
profileId = profile.id
|
||||
fetched = true
|
||||
|
||||
if profileId.len == 0 or profile.protected:
|
||||
result[0] = profile
|
||||
return
|
||||
elif profileId == "s":
|
||||
result[0] = Profile(username: name, suspended: true)
|
||||
return
|
||||
if profile.protected or profile.suspended:
|
||||
return (profile, Timeline(), @[])
|
||||
elif profileId.len == 0:
|
||||
return (Profile(username: name), Timeline(), @[])
|
||||
|
||||
var rail: Future[PhotoRail]
|
||||
if skipRail or profile.protected or query.kind == media:
|
||||
|
|
|
|||
Loading…
Reference in a new issue