Skip to content

Commit

Permalink
Fetch more password-canddate mails from Gmail
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinari-nomura committed Jan 29, 2020
1 parent ed3f74d commit 05bd147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/glima/gmail_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AuthorizationError < StandardError ; end
def nearby_mails(pivot_mail)
from = "from:#{pivot_mail.from}"
date1 = (pivot_mail.date.to_date - 1).strftime("after:%Y/%m/%d")
date2 = (pivot_mail.date.to_date + 1).strftime("before:%Y/%m/%d")
date2 = (pivot_mail.date.to_date + 2).strftime("before:%Y/%m/%d")
query = "#{from} -in:trash #{date1} #{date2}"
scan_batch("+all", query, false) do |mail|
next if pivot_mail.id == mail.id
Expand Down

0 comments on commit 05bd147

Please sign in to comment.