diff options
author | Vitaly Takmazov | 2021-10-21 22:52:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-10-21 22:52:14 +0300 |
commit | c6972c05dcee19afb5725767f755a56f5162aee2 (patch) | |
tree | 64b8f3588e97d8e1141fc17646e99a11f57abe46 /src/main/java/com/juick/www/api/Messages.java | |
parent | cfb6c1894d8223eac62d03eeececa7baf192aced (diff) |
Make popular feed equal to service user recommendations feed to have correct RSS feeds
Diffstat (limited to 'src/main/java/com/juick/www/api/Messages.java')
-rw-r--r-- | src/main/java/com/juick/www/api/Messages.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/juick/www/api/Messages.java b/src/main/java/com/juick/www/api/Messages.java index 7b003220..9608813d 100644 --- a/src/main/java/com/juick/www/api/Messages.java +++ b/src/main/java/com/juick/www/api/Messages.java @@ -65,6 +65,8 @@ public class Messages { private WebApp webApp; @Value("classpath:Transparent.gif") private Resource invisiblePixel; + @Inject + private User serviceUser; // TODO: serialize image urls @@ -102,7 +104,7 @@ public class Messages { throw new HttpNotFoundException(); } } else if (StringUtils.hasText(withrecommended)) { - mids = messagesService.getUserBlogWithRecommendations(user.getUid(), 0, before); + mids = messagesService.getUserBlogWithRecommendations(user, visitor, 0, before); } else if (daysback > 0) { mids = messagesService.getUserBlogAtDay(user.getUid(), 0, daysback); } else if (StringUtils.hasText(search)) { @@ -116,7 +118,7 @@ public class Messages { } } else { if (StringUtils.hasText(popular)) { - mids = messagesService.getPopular(visitor.getUid(), before); + mids = messagesService.getUserBlogWithRecommendations(serviceUser, visitor, 0, before); } else if (StringUtils.hasText(media)) { mids = messagesService.getPhotos(visitor.getUid(), before); } else if (StringUtils.hasText(tag)) { |