You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/11/12 16:52:18 UTC
[30/32] usergrid git commit: fix bug in expiration
fix bug in expiration
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/24600e0b
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/24600e0b
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/24600e0b
Branch: refs/heads/master
Commit: 24600e0bd17bff9ca022271d780a7e220bfda94e
Parents: 5fd1d5d
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed Nov 11 09:48:42 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed Nov 11 09:48:42 2015 -0700
----------------------------------------------------------------------
.../apache/usergrid/services/notifications/wns/WNSAdapter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/24600e0b/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java b/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
index 3ad3d35..f2946df 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
@@ -77,8 +77,9 @@ public class WNSAdapter implements ProviderAdapter {
// set the optional TTL value used when pushing notifications
WnsNotificationRequestOptional opt = new WnsNotificationRequestOptional();
- opt.ttl = String.valueOf(notification.getExpireTTLSeconds());
-
+ if(notification.getExpireTTLSeconds()>0) {
+ opt.ttl = String.valueOf(notification.getExpireTTLSeconds());
+ }
switch (translatedNotification.getType()) {
case "toast":
WnsToast toast = new WnsToastBuilder().bindingTemplateToastText01(translatedNotification.getMessage().toString()).build();