google-api-fcm 0.1.1 → 0.1.2

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: 9c41545a43261ed60e68c85cffcc631e272acc40
4
- data.tar.gz: 0a088f1d1ca1866c3277e56ce4603e4f7edc22ce
3
+ metadata.gz: 765556ff5f9e71cf5e7153d95eef8db4caa71a4a
4
+ data.tar.gz: 93fc4304c7c1dad9122c41f5fc1d95406da6bda1
5
5
  SHA512:
6
- metadata.gz: f107b12f24ab8578cf31cc06e84d98839e54807d9e3dcead3033373d2bf6cf032c10ff98a19fd14e06bf097fd61851cef63e11ef82e5a34a9a218994fd862eea
7
- data.tar.gz: 5127a792147c8336861365b1b3127737e6a7ebbd974ad0c87f8cd5bb3b7a3ca960b7d16827b5558a4bce949ac2858d284b94ca48cd9d0a11e15238849d32524e
6
+ metadata.gz: 3d1345dc8049f93178ee0f82e96cc2cd8a551b44bd26e90ec4a5b802f59df828db91a0d3063690f4e23dc5b06b2e9800d0fc762ed6399e14de884f5f279bee10
7
+ data.tar.gz: fbf2d2f02def69930942b9e7751acd33396da058aa93d9e06ab16d1debb880e447b77600f3ad7cdb8213a7d48b7d8902feba0e1efd22b643a2fae07120089192
@@ -11,17 +11,22 @@ module Google
11
11
  end
12
12
 
13
13
  def initialize_build(**args)
14
- notification = Notification.new(
15
- title: args[:notification][:title],
16
- body: args[:notification][:body]
17
- )
14
+ if args[:notification]
15
+ notification = Notification.new(
16
+ title: args[:notification][:title],
17
+ body: args[:notification][:body]
18
+ )
19
+ end
18
20
 
19
21
  message_object_args = {
20
22
  topic: args[:topic],
21
- notification: notification,
22
23
  data: args[:payload]
23
24
  }
24
25
 
26
+ if notification
27
+ message_object_args[:notification] = notification
28
+ end
29
+
25
30
  if args.key?(:webpush) && args[:webpush][:icon]
26
31
  message_object_args[:webpush] = Webpush.new(args[:webpush])
27
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-api-fcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Krigouzov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-28 00:00:00.000000000 Z
11
+ date: 2018-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client