From 5a2466e6fe70f9868d0f8e0970638f1cb260c8f7 Mon Sep 17 00:00:00 2001 From: skubiak Date: Fri, 9 Jan 2015 07:59:09 +0100 Subject: [PATCH] added default values for priority and sound --- src/main/java/de/svenkubiak/jpushover/JPushover.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/svenkubiak/jpushover/JPushover.java b/src/main/java/de/svenkubiak/jpushover/JPushover.java index 6f0a8a3..3d8e65c 100644 --- a/src/main/java/de/svenkubiak/jpushover/JPushover.java +++ b/src/main/java/de/svenkubiak/jpushover/JPushover.java @@ -41,6 +41,8 @@ public class JPushover { private Sound pushoverSound; public JPushover(){ + this.pushoverSound = Sound.PUSHOVER; + this.pushoverPriority = Priority.NORMAL; } /** @@ -227,9 +229,9 @@ public class JPushover { .add(Constants.EXPIRE.get(), this.pushoverExpire) .add(Constants.CALLBACK.get(), this.pushoverCallback) .add(Constants.URLTITLE.get(), this.pushoverUrlTitle) - .add(Constants.PRIORITY.get(), (this.pushoverPriority == null) ? null : this.pushoverPriority.get()) + .add(Constants.PRIORITY.get(), this.pushoverPriority.get()) .add(Constants.TIMESTAMP.get(), this.pushoverTimestamp) - .add(Constants.SOUND.get(), (this.pushoverSound == null) ? null : this.pushoverSound.get()) + .add(Constants.SOUND.get(), this.pushoverSound.get()) .build(); HttpResponse httpResponse = null;