Permalink
Browse files

Fixed/ improved test.

  • Loading branch information...
martini committed Dec 7, 2018
1 parent 079c4c9 commit d105bc4c605a8f9280ed5fda88128290e52ec7bc
Showing with 7 additions and 4 deletions.
  1. +6 −4 app/models/channel/driver/twitter.rb
  2. +1 −0 spec/models/channel/driver/twitter_spec.rb
@@ -177,10 +177,12 @@ def fetch_search
next if !track_retweets? && tweet.retweet?

# ignore older messages
if (@channel.created_at - 15.days) > tweet.created_at.dup.utc || older_import >= older_import_max
older_import += 1
Rails.logger.debug { "tweet to old: #{tweet.id}/#{tweet.created_at}" }
next
if @sync[:import_older_tweets] != true
if (@channel.created_at - 15.days) > tweet.created_at.dup.utc || older_import >= older_import_max
older_import += 1
Rails.logger.debug { "tweet to old: #{tweet.id}/#{tweet.created_at}" }
next
end
end

next if @client.locale_sender?(tweet) && own_tweet_already_imported?(tweet)
@@ -21,6 +21,7 @@
id: 'system_id',
},
sync: {
import_older_tweets: true,
track_retweets: true,
search: [
{

0 comments on commit d105bc4

Please sign in to comment.