diff options
-rw-r--r-- | src/main/java/com/juick/server/SubscriptionsQueries.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/SubscriptionsQueries.java b/src/main/java/com/juick/server/SubscriptionsQueries.java index 9f0372ff..0cf3f169 100644 --- a/src/main/java/com/juick/server/SubscriptionsQueries.java +++ b/src/main/java/com/juick/server/SubscriptionsQueries.java @@ -14,6 +14,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.logging.Logger; +import java.util.stream.Collectors; /** * @@ -36,9 +37,9 @@ public class SubscriptionsQueries { } public static List<User> getSubscribedUsers(JdbcTemplate sql, int uid, int mid) { - List<Integer> userids = UserQueries.getUserRead(sql, uid); + List<User> userids = UserQueries.getUserReaders(sql, uid); Set<Integer> set = new HashSet<>(); - set.addAll(userids); + set.addAll(userids.stream().map(User::getUID).collect(Collectors.toList())); List<Integer> tags = MessagesQueries.getMessageTagsIDs(sql, mid); if (tags.size() > 0) { List<Integer> tagUsers = sql.queryForList("SELECT suser_id FROM subscr_tags " + |