From d556681a773c8bd695ca58c325a132b3de2c0c44 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 12 Jul 2016 09:35:14 +0300 Subject: Push: using all user tokens for PMs --- juick-www/src/main/java/com/juick/www/PushComponent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-www') 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 regids = new ArrayList<>(); if (isPM) { - PushQueries.getAndroidRegID(sql, pmTo).ifPresent(regids::add); + regids.addAll(PushQueries.getAndroidRegID(sql, pmTo)); } else { List 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 urls = new ArrayList<>(); if (isPM) { - PushQueries.getWinPhoneURL(sql, pmTo).ifPresent(urls::add); + urls.addAll(PushQueries.getWinPhoneURL(sql, pmTo)); } else { List 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 tokens = new ArrayList<>(); if (isPM) { - PushQueries.getAPNSToken(sql, pmTo).ifPresent(tokens::add); + tokens.addAll(PushQueries.getAPNSToken(sql, pmTo)); } else { List uids = subscribedUsers.stream().map(com.juick.User::getUID).collect(Collectors.toList()); if (uids.size() > 0) { -- cgit v1.2.3