Fix search

This commit is contained in:
Alessio 2022-12-09 23:01:47 -05:00
parent 7bad18e9b1
commit f2af4b2403
2 changed files with 3 additions and 3 deletions

View File

@ -267,8 +267,8 @@ test $(sqlite3 twitter.db "select count(*) from tweets where user_id = (select i
# Test search
#tw search "from:michaelmalice constitution"
#test $(sqlite3 twitter.db "select count(*) from tweets where user_id = 44067298 and text like '%constitution%'") -gt "30" # Not sure exactly how many
tw search "from:michaelmalice constitution"
test $(sqlite3 twitter.db "select count(*) from tweets where user_id = 44067298 and text like '%constitution%'") -gt "30" # Not sure exactly how many
# Test fetching a banned user

View File

@ -337,7 +337,7 @@ func (api API) GetMoreTweetsFromSearch(query string, response *TweetResponse, ma
if err != nil {
return err
}
if fresh_response.GetCursor() == last_response.GetCursor() && len(fresh_response.GlobalObjects.Tweets) == 0 {
if fresh_response.GetCursor() == last_response.GetCursor() || len(fresh_response.GlobalObjects.Tweets) == 0 {
// Empty response, cursor same as previous: end of feed has been reached
return END_OF_FEED
}