diff --git a/src/BirdsiteLive.Pipeline/Processors/RetrieveTweetsProcessor.cs b/src/BirdsiteLive.Pipeline/Processors/RetrieveTweetsProcessor.cs index bd260bf..0f85d7c 100644 --- a/src/BirdsiteLive.Pipeline/Processors/RetrieveTweetsProcessor.cs +++ b/src/BirdsiteLive.Pipeline/Processors/RetrieveTweetsProcessor.cs @@ -84,9 +84,9 @@ namespace BirdsiteLive.Pipeline.Processors try { if (user.LastTweetPostedId == -1) - tweets = await _twitterTweetsService.GetTimelineAsync(user.Acct, 1); + tweets = await _twitterTweetsService.GetTimelineAsync(user.Acct); else - tweets = await _twitterTweetsService.GetTimelineAsync(user.Acct, 200, user.LastTweetSynchronizedForAllFollowersId); + tweets = await _twitterTweetsService.GetTimelineAsync(user.Acct, user.LastTweetSynchronizedForAllFollowersId); } catch (Exception e) { diff --git a/src/BirdsiteLive.Twitter/TwitterTweetsService.cs b/src/BirdsiteLive.Twitter/TwitterTweetsService.cs index af14ce9..fef0167 100644 --- a/src/BirdsiteLive.Twitter/TwitterTweetsService.cs +++ b/src/BirdsiteLive.Twitter/TwitterTweetsService.cs @@ -20,7 +20,7 @@ namespace BirdsiteLive.Twitter public interface ITwitterTweetsService { Task GetTweetAsync(long statusId); - Task GetTimelineAsync(string username, int nberTweets, long fromTweetId = -1); + Task GetTimelineAsync(string username, long fromTweetId = -1); } public class TwitterTweetsService : ITwitterTweetsService @@ -78,7 +78,7 @@ namespace BirdsiteLive.Twitter } } - public async Task GetTimelineAsync(string username, int nberTweets, long fromTweetId = -1) + public async Task GetTimelineAsync(string username, long fromTweetId = -1) { var client = await _twitterAuthenticationInitializer.MakeHttpClient(); diff --git a/src/Tests/BirdsiteLive.Twitter.Tests/TimelineTests.cs b/src/Tests/BirdsiteLive.Twitter.Tests/TimelineTests.cs index 63c3aef..0aadd77 100644 --- a/src/Tests/BirdsiteLive.Twitter.Tests/TimelineTests.cs +++ b/src/Tests/BirdsiteLive.Twitter.Tests/TimelineTests.cs @@ -39,11 +39,18 @@ namespace BirdsiteLive.ActivityPub.Tests [TestMethod] public async Task TimelineKobe() { - var tweets = await _tweetService.GetTimelineAsync("kobebryant", 100, 1218020971346444288); + var tweets = await _tweetService.GetTimelineAsync("kobebryant", 1218020971346444288); Assert.AreEqual(tweets[0].MessageContent, "Continuing to move the game forward @KingJames. Much respect my brother 💪🏾 #33644"); Assert.AreEqual(tweets.Length, 8); } + [TestMethod] + public async Task TimelineGrant() + { + var tweets = await _tweetService.GetTimelineAsync("grantimahara", default); + Assert.IsTrue(tweets[0].IsReply); + Assert.AreEqual(tweets.Length, 40); + } } }