Fix runtime error
This commit is contained in:
parent
5c6a4dcc8d
commit
0ad2a275ea
1 changed files with 8 additions and 6 deletions
14
util.go
14
util.go
|
|
@ -193,12 +193,14 @@ func parseTimeline(timeline *timeline) ([]*Tweet, string) {
|
||||||
|
|
||||||
var cursor string
|
var cursor string
|
||||||
var orderedTweets []*Tweet
|
var orderedTweets []*Tweet
|
||||||
for _, entry := range timeline.Timeline.Instructions[0].AddEntries.Entries {
|
if len(timeline.Timeline.Instructions) > 0 {
|
||||||
if tweet, ok := tweets[entry.Content.Item.Content.Tweet.ID]; ok {
|
for _, entry := range timeline.Timeline.Instructions[0].AddEntries.Entries {
|
||||||
orderedTweets = append(orderedTweets, &tweet)
|
if tweet, ok := tweets[entry.Content.Item.Content.Tweet.ID]; ok {
|
||||||
}
|
orderedTweets = append(orderedTweets, &tweet)
|
||||||
if entry.Content.Operation.Cursor.CursorType == "Bottom" {
|
}
|
||||||
cursor = entry.Content.Operation.Cursor.Value
|
if entry.Content.Operation.Cursor.CursorType == "Bottom" {
|
||||||
|
cursor = entry.Content.Operation.Cursor.Value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return orderedTweets, cursor
|
return orderedTweets, cursor
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue