messenger_client 0.1.4 → 0.1.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 581159816dea2145b543e61c4faf8134da6a7752
|
4
|
+
data.tar.gz: 667bce930cb55d9b0b8ef99493ab78e17c9d94ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38166248244119fd50dc5835fb3b3f32da97889c82f97cfbcc945808fc737c462af9c894f9179734cc3f16133d96d3e5cfbc3a50ac3b2230810fe84f2a5556eb
|
7
|
+
data.tar.gz: 100108c26449f1b67f712fe443b0e2a19a4625fe67bd169545759b3c43b8090d96bc8ef8bfac26afcd963d0e807f1b4efece043154f92b62408180bbad521097
|
@@ -19,7 +19,7 @@ module MessengerClient
|
|
19
19
|
timestamp = message["timestamp"]
|
20
20
|
m = message["message"]
|
21
21
|
if m.nil?
|
22
|
-
return
|
22
|
+
return parse_non_message(message, timestamp, sender)
|
23
23
|
end
|
24
24
|
if attchs = m["attachments"]
|
25
25
|
attch = attchs.first
|
@@ -60,11 +60,15 @@ module MessengerClient
|
|
60
60
|
return nil
|
61
61
|
end
|
62
62
|
|
63
|
-
def
|
63
|
+
def parse_non_message(message, timestamp, sender)
|
64
64
|
if pb = message["postback"]
|
65
65
|
payload = pb["payload"].to_sym
|
66
66
|
return MessengerClient::Message::Postback.new(timestamp, sender, payload)
|
67
67
|
end
|
68
|
+
if optin = message["optin"]
|
69
|
+
ref = optin["ref"]
|
70
|
+
return MessengerClient::Message::Optin.new(timestamp, sender, ref)
|
71
|
+
end
|
68
72
|
return nil
|
69
73
|
end
|
70
74
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messenger_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Cruz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- lib/messenger_client/message/file.rb
|
103
103
|
- lib/messenger_client/message/image.rb
|
104
104
|
- lib/messenger_client/message/location.rb
|
105
|
+
- lib/messenger_client/message/optin.rb
|
105
106
|
- lib/messenger_client/message/postback.rb
|
106
107
|
- lib/messenger_client/message/quick_reply.rb
|
107
108
|
- lib/messenger_client/message/sender.rb
|