diff options
author | Vitaly Takmazov | 2023-01-22 14:14:58 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-22 14:14:58 +0300 |
commit | 9ad08dc78e0cdbe2cdebf10a96c800e72d48e48b (patch) | |
tree | 25ef5787f8a77bd24c40490edaafe7d8a4697389 /src/main/java/com/juick/www/controllers | |
parent | d17e5714c9b421fce507d310fd913ce3160a1764 (diff) |
Refactor messages service, remove 2 unneeded SQL queries
Diffstat (limited to 'src/main/java/com/juick/www/controllers')
-rw-r--r-- | src/main/java/com/juick/www/controllers/Site.java | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java index 06513fcc..bfe7d654 100644 --- a/src/main/java/com/juick/www/controllers/Site.java +++ b/src/main/java/com/juick/www/controllers/Site.java @@ -569,8 +569,6 @@ public class Site { model.addAttribute("headers", headers); model.addAttribute("visitorSubscribed", messagesService.isSubscribed(visitor.getUid(), msg.getMid())); model.addAttribute("visitorInBL", userService.isInBL(msg.getUser().getUid(), visitor.getUid())); - model.addAttribute("recomm", messagesService.getMessagesRecommendations(Collections.singletonList(msg.getMid())) - .stream().map(Pair::getRight).toList()); List<Integer> blUIDs = new ArrayList<>(); for (Message reply : replies) { if (reply.getUser().getUid() != msg.getUser().getUid() && !blUIDs.contains(reply.getUser().getUid())) { |