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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fuck_facebook/version.rb +1 -1
- data/src/message_handler.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58036357e5b5129b1f1d3395335e519c5fe361b888367f39b0aa22868ccafea2
|
4
|
+
data.tar.gz: 75b470be6a7b43fb1b2f1169c76b94c0f36fa7dd16e7f407fd0c604b74e740ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a0b4111c0c2df0dc5fca7d154152b593e42a7f7bcf98eace36d4a85422a8786168c1b668b910b1e0187e9edbf683ae772f04aa1b471594702a7b6134d975b88
|
7
|
+
data.tar.gz: 6fb6a161adbfc38a33af6a36f1c56dfa98fc8d0cc5b311b0783ded7cd9b7d9d5eec0badf12076bccec281f03e4e7a474031073cd24d3a6fd89c40596798ca32d
|
data/Gemfile.lock
CHANGED
data/src/message_handler.rb
CHANGED
@@ -53,13 +53,12 @@ class MessageHandler
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def messages_after_last_message_time(messages)
|
56
|
-
|
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 >
|
59
|
+
messages_to_return = messages.select { _1.timestamp > last_check_time_with_buffer }
|
59
60
|
|
60
|
-
|
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.
|
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-
|
11
|
+
date: 2021-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|