emailbutler 0.5.6 → 0.5.7

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: 83bd2cbfef3169592a190131ff09124cee494f26f81f96f6a93e04138e4d3439
4
- data.tar.gz: 75be821dde3a84855c1aa8407a4946c82bbf736e6d92aad7451ac22abce8e385
3
+ metadata.gz: e6e807c1f5296032d8b8c8f43a4b3951043cd381f650476fc1c1089ad7abd997
4
+ data.tar.gz: e7c80bca2d6753a787eadfc19254fb98c7c3b876c641d9f3c566bae5e05c78e2
5
5
  SHA512:
6
- metadata.gz: 0bc138bd2a1bdac58cb71cfc6d805bc5c58d8c0f6dda7ca65be307f6849f53d53b8d00ea1576556a54c2a53dea3896f61ac8836e81dc061ecc3fef920cc2f9b7
7
- data.tar.gz: 80fe2b4f28eb5952fd67db7ac7a16485a29cd314c654cbbad0e1bc9b0659bc1f687dff5e35bd8e57289468ce7a8619fcc1a58996ac200614ee96337fdefa87da
6
+ metadata.gz: b7aba7d1c2d0cfc65d421218ca59c4cb9481649923dad6c5e19720602cf3be80145a9ebdae54ad512c5341cf0b8f849b0495e4cd9e48b0f4b9c243c87c5bf760
7
+ data.tar.gz: deec7c601e36ac1157bceab45a0b3d66aa5a861d8756af4d113c3821be2a5b960854ea98deab0a6cfc23ce5aab3e409ab8232aaddd47fcc94f1b15719daa87b3
@@ -16,7 +16,7 @@ module Emailbutler
16
16
  private
17
17
 
18
18
  def receiver_params
19
- params.permit('_json' => %w[smtp-id event])
19
+ params.permit('_json' => %w[smtp-id event timestamp])
20
20
  end
21
21
  end
22
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emailbutler
4
- VERSION = '0.5.6'
4
+ VERSION = '0.5.7'
5
5
  end
@@ -7,9 +7,12 @@ module Emailbutler
7
7
  DELIVERABILITY_MAPPER = {
8
8
  'processed' => 'processed',
9
9
  'delivered' => 'delivered',
10
+ 'open' => 'delivered',
11
+ 'click' => 'delivered',
10
12
  'deferred' => 'failed',
11
13
  'bounce' => 'failed',
12
- 'dropped' => 'failed'
14
+ 'dropped' => 'failed',
15
+ 'spamreport' => 'failed'
13
16
  }.freeze
14
17
 
15
18
  def self.call(...)
@@ -16,6 +16,8 @@ module Emailbutler
16
16
  .call(payload: payload)
17
17
  .each { |event|
18
18
  message = Emailbutler.find_message_by(uuid: event.delete(:message_uuid))
19
+ next unless message
20
+
19
21
  Emailbutler.update_message(message, event)
20
22
  }
21
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emailbutler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdanov Anton