notify_user 0.0.25 → 0.0.26
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: d94141a8a16e9d4f68c8f8b8f0dbb2d4daf4c59e
|
4
|
+
data.tar.gz: 105a25b9ca97eb2f7a9f2a9fa3f8303acb34ad2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
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
|
data/lib/notify_user/version.rb
CHANGED