Skip to content

Commit

Permalink
Reduce time duration
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Jun 25, 2019
1 parent cc86eb7 commit 1f6d375
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/query_mentions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ func QueryMentions(twttr svc.Twitter, snsClient svc.SNSType) error {

// Iterate through mentions, publishing each to SNS topic
for _, tweet := range tweets {
// Ignore if more than 12 hours old or doesn't have a user
// Ignore if more than 2 hours old or doesn't have a user
createdTime, _ := tweet.CreatedAtTime()
if createdTime.Before(time.Now().Add(time.Hour*-12)) || tweet.User == nil {
if createdTime.Before(time.Now().Add(time.Hour*-2)) || tweet.User == nil {
continue
}
// TODO: Figure out ExtendedTweet
Expand Down

0 comments on commit 1f6d375

Please sign in to comment.