fuck_facebook 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24caa7bf76958d703667ca687fb2bc9cf4aa7b6ea2bc56db68e08a13ab74bc08
4
- data.tar.gz: 540bdba30c7e8b0761fde58f30d87decfbd6593f137e2d293e5a8b292c1c180d
3
+ metadata.gz: 58036357e5b5129b1f1d3395335e519c5fe361b888367f39b0aa22868ccafea2
4
+ data.tar.gz: 75b470be6a7b43fb1b2f1169c76b94c0f36fa7dd16e7f407fd0c604b74e740ad
5
5
  SHA512:
6
- metadata.gz: fd41131b5187fe85b56adcb45d3d1f857d109bb925c0cf65012baf4aaf195d67317484593764a869eaf2b2ed18f336b98f47346031cfe000c1ced8cb1823afc7
7
- data.tar.gz: 0c1873d36d15249e85311aabf4de4ed4517b0f378881a032e871b96a35d0c02db6113fe65f70980896633680df85efe70155d230d18e4c2824cf9d67e88dae7d
6
+ metadata.gz: 9a0b4111c0c2df0dc5fca7d154152b593e42a7f7bcf98eace36d4a85422a8786168c1b668b910b1e0187e9edbf683ae772f04aa1b471594702a7b6134d975b88
7
+ data.tar.gz: 6fb6a161adbfc38a33af6a36f1c56dfa98fc8d0cc5b311b0783ded7cd9b7d9d5eec0badf12076bccec281f03e4e7a474031073cd24d3a6fd89c40596798ca32d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fuck_facebook (0.2.1)
4
+ fuck_facebook (0.4.0)
5
5
  activesupport (~> 6.1)
6
6
  highline (~> 2.0)
7
7
  mail (~> 2.7)
@@ -1,3 +1,3 @@
1
1
  module FuckFacebook
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
@@ -53,13 +53,12 @@ class MessageHandler
53
53
  end
54
54
 
55
55
  def messages_after_last_message_time(messages)
56
- last_message_time = Storage.get(:last_message_time, default: Time.new(2004, 2, 4))
56
+ last_message_check_time = Storage.get(:last_message_check_time, default: Time.new(2004, 2, 4))
57
+ last_check_time_with_buffer = last_message_check_time - 5.minutes
57
58
 
58
- messages_to_return = messages.select { _1.timestamp > last_message_time }
59
+ messages_to_return = messages.select { _1.timestamp > last_check_time_with_buffer }
59
60
 
60
- last_message_time = messages.map(&:timestamp).max
61
-
62
- Storage.set(:last_message_time, last_message_time)
61
+ Storage.set(:last_message_check_time, Time.now)
63
62
 
64
63
  messages_to_return
65
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuck_facebook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keeyan Nejad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-24 00:00:00.000000000 Z
11
+ date: 2021-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport