Don't use the SINCE parameter except for the main Twitter timeline to help with missing Tweets.

This commit is contained in:
Maurice Parker 2020-12-10 15:44:54 -06:00
parent f5c0a29650
commit 2fbbdce46c
1 changed files with 5 additions and 4 deletions

View File

@ -205,13 +205,14 @@ public final class TwitterFeedProvider: FeedProvider {
var parameters = [String: Any]() var parameters = [String: Any]()
var isSearch = false var isSearch = false
if let sinceToken = webFeed.sinceToken, let sinceID = Int(sinceToken) { parameters["count"] = 20
parameters["since_id"] = sinceID
}
switch urlComponents.path { switch urlComponents.path {
case "", "/", "/home": case "", "/", "/home":
parameters["count"] = 100 parameters["count"] = 100
if let sinceToken = webFeed.sinceToken, let sinceID = Int(sinceToken) {
parameters["since_id"] = sinceID
}
api = "statuses/home_timeline.json" api = "statuses/home_timeline.json"
case "/notifications/mentions": case "/notifications/mentions":
api = "statuses/mentions_timeline.json" api = "statuses/mentions_timeline.json"