emailbutler 0.5.7 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/emailbutler/version.rb +1 -1
- data/lib/emailbutler/webhooks/mappers/sendgrid.rb +4 -3
- 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: f50e9fa608f40393da425be526cb75374fadaac1f5b3bd0661a697a6a1192dfc
|
4
|
+
data.tar.gz: 024f73f88ad01d11a9dbdaee2b9609fe27ba0789e71469c0c9ba347201a7f68a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65f5c4e8c3da5a6f3e631e77543482a1b2b76ad65454d9871e51b695323291af2622d6bf7e62cddccbe4a3355f72d806582b20de466453db2a18f841cd25caad
|
7
|
+
data.tar.gz: 60bd472105643745afe5d118096fed87feca19c1e940eb4a4ad899eb56b8e82b5cbdeb62b618f4d987e4edb8537101b7a946ccd276eabc5ed0523236f15a4dec
|
data/lib/emailbutler/version.rb
CHANGED
@@ -21,14 +21,15 @@ module Emailbutler
|
|
21
21
|
|
22
22
|
def call(payload:)
|
23
23
|
payload['_json'].filter_map { |message|
|
24
|
-
|
24
|
+
message.stringify_keys!
|
25
|
+
message_uuid = message['smtp-id'] || message['sg_message_id']
|
25
26
|
status = DELIVERABILITY_MAPPER[message['event']]
|
26
|
-
next
|
27
|
+
next if message_uuid.nil? || status.nil?
|
27
28
|
|
28
29
|
{
|
29
30
|
message_uuid: message_uuid,
|
30
31
|
status: status,
|
31
|
-
timestamp: Time.at(message['timestamp']).utc.to_datetime
|
32
|
+
timestamp: message['timestamp'] ? Time.at(message['timestamp'].to_i).utc.to_datetime : nil
|
32
33
|
}
|
33
34
|
}
|
34
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emailbutler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdanov Anton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pagy
|