aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-12 09:35:14 +0300
committerGravatar Vitaly Takmazov2016-07-12 09:35:14 +0300
commitd556681a773c8bd695ca58c325a132b3de2c0c44 (patch)
tree874bf475de4cbd67976f659b7a1852230831caa6 /juick-www/src/main/java/com
parent39d3d0a4693bc985641b4e2372e0010b26ff0030 (diff)
Push: using all user tokens for PMs
Diffstat (limited to 'juick-www/src/main/java/com')
-rw-r--r--juick-www/src/main/java/com/juick/www/PushComponent.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/PushComponent.java b/juick-www/src/main/java/com/juick/www/PushComponent.java
index 67366628..65fbcef0 100644
--- a/juick-www/src/main/java/com/juick/www/PushComponent.java
+++ b/juick-www/src/main/java/com/juick/www/PushComponent.java
@@ -158,7 +158,7 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
/*** ANDROID ***/
final List<String> regids = new ArrayList<>();
if (isPM) {
- PushQueries.getAndroidRegID(sql, pmTo).ifPresent(regids::add);
+ regids.addAll(PushQueries.getAndroidRegID(sql, pmTo));
} else {
List<Integer> uids = subscribedUsers.stream().map(com.juick.User::getUID).collect(Collectors.toList());
if (uids.size() > 0) {
@@ -189,7 +189,7 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
/*** WinPhone ***/
final List<String> urls = new ArrayList<>();
if (isPM) {
- PushQueries.getWinPhoneURL(sql, pmTo).ifPresent(urls::add);
+ urls.addAll(PushQueries.getWinPhoneURL(sql, pmTo));
} else {
List<Integer> uids = subscribedUsers.stream().map(com.juick.User::getUID).collect(Collectors.toList());
if (uids.size() > 0) {
@@ -234,7 +234,7 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
/*** iOS ***/
final List<String> tokens = new ArrayList<>();
if (isPM) {
- PushQueries.getAPNSToken(sql, pmTo).ifPresent(tokens::add);
+ tokens.addAll(PushQueries.getAPNSToken(sql, pmTo));
} else {
List<Integer> uids = subscribedUsers.stream().map(com.juick.User::getUID).collect(Collectors.toList());
if (uids.size() > 0) {