notify_user 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ac2603bea84ed0732f612ebe0a863a014f8091b
4
- data.tar.gz: ef99a7d91412f59b1499d7024c0ec4c8623e6eb2
3
+ metadata.gz: d94141a8a16e9d4f68c8f8b8f0dbb2d4daf4c59e
4
+ data.tar.gz: 105a25b9ca97eb2f7a9f2a9fa3f8303acb34ad2c
5
5
  SHA512:
6
- metadata.gz: f8fed45fe13ac4a464a1244fb23ad9450aaad74aa3265ebceb3ce6f3cb99d81d0175263e3ee7bfebfe0d011d08978bf00e1866a9a6ad443e296305e5f327369d
7
- data.tar.gz: 8ae0a24bb1aa3fb3227dd3781919d02241351fe2390dc4e5c25df3420a48fbba006e76c71b812d5ca6a6363e28fe5635a78bec2e159f9cadc40e9dfdd4d50d1d
6
+ metadata.gz: a9d94e03b19c8016aff586a032030f5b9dec2734be69db9d3ac8f220c0be6e02e865386421988276acbe6fd743bfecc91ef0f25c2aa11cbbe645dfdb96b8bbd7
7
+ data.tar.gz: 5cab189693268c92ab1d77e27711296e7778ca35949f8ef825216036586fae45800848f6dd5efc382bfc1a55d97cd6c721e55911ed64d9ad3bc6a3ed23861b54
@@ -66,7 +66,7 @@ module NotifyUser
66
66
  ActionView::Base.new(
67
67
  Rails.configuration.paths["app/views"]).render(
68
68
  :template => self.class.views[:mobile_sdk][:template_path].call(self), :formats => [:html],
69
- :locals => { :params => self.params}, :layout => false).html_safe
69
+ :locals => { :params => self.params}, :layout => false)
70
70
  end
71
71
 
72
72
  def mobile_message(length=115)
@@ -274,7 +274,6 @@ module NotifyUser
274
274
  end
275
275
 
276
276
  private
277
-
278
277
  def unsubscribed_validation
279
278
  errors.add(:target, (" has unsubscribed from this type")) if user_has_unsubscribed?
280
279
  end
@@ -293,5 +292,6 @@ module NotifyUser
293
292
  return false
294
293
  end
295
294
 
295
+
296
296
  end
297
297
  end
@@ -29,11 +29,19 @@ module NotifyUser
29
29
  pn_apns[:aps][:action_id] = notification.params[:action_id] if notification.params[:action_id]
30
30
  pn_apns[:aps]['content-available'] = notification.params['content-available'] if notification.params['content-available']
31
31
 
32
+ pn_gcm = {
33
+ message: notification.mobile_message,
34
+ type: notification.type
35
+ }
36
+
37
+ pn_gcm[:action_id] = notification.params[:action_id] if notification.params[:action_id]
38
+
32
39
  pubnub.publish(
33
40
  channel: notification.target.uuid,
34
41
  http_sync: true,
35
42
  message: {
36
- pn_apns: pn_apns
43
+ pn_apns: pn_apns,
44
+ pn_gcm: pn_gcm
37
45
  }
38
46
  )
39
47
  end
@@ -1,3 +1,3 @@
1
1
  module NotifyUser
2
- VERSION = "0.0.25"
2
+ VERSION = "0.0.26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notify_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Spacek