diff options
Diffstat (limited to 'src/main/java/com/juick/server/api/Messages.java')
-rw-r--r-- | src/main/java/com/juick/server/api/Messages.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/juick/server/api/Messages.java b/src/main/java/com/juick/server/api/Messages.java index 8aae0d57..4ce1ea13 100644 --- a/src/main/java/com/juick/server/api/Messages.java +++ b/src/main/java/com/juick/server/api/Messages.java @@ -78,7 +78,7 @@ public class Messages { int vuid = visitor.getUid(); List<Integer> mids = messagesService.getMyFeed(vuid, before_mid, true); List<Message> msgs = messagesService.getMessages(visitor, mids); - msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarPublicUrl(m.getUser()))); + msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarWebPath(m.getUser()))); return ResponseEntity.ok(msgs); } return FORBIDDEN; @@ -141,7 +141,7 @@ public class Messages { } } List<Message> msgs = messagesService.getMessages(visitor, mids); - msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarPublicUrl(m.getUser()))); + msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarWebPath(m.getUser()))); return ResponseEntity.ok(msgs); } @DeleteMapping("/api/messages") @@ -161,7 +161,7 @@ public class Messages { public List<Message> getDiscussions( @RequestParam(required = false, defaultValue = "0") Long to) { List<Message> msgs = messagesService.getMessages(UserUtils.getCurrentUser(), messagesService.getDiscussions(UserUtils.getCurrentUser().getUid(), to)); - msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarPublicUrl(m.getUser()))); + msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarWebPath(m.getUser()))); return msgs; } @GetMapping("/api/thread") @@ -177,10 +177,10 @@ public class Messages { if (userService.getUserByName(msg.getUser().getName()).isBanned()) { throw new HttpNotFoundException(); } - msg.getUser().setAvatar(webApp.getAvatarPublicUrl(msg.getUser())); + msg.getUser().setAvatar(webApp.getAvatarWebPath(msg.getUser())); msg.setRecommendations(new HashSet<>(messagesService.getMessageRecommendations(msg.getMid()))); List<com.juick.Message> replies = messagesService.getReplies(visitor, mid); - replies.forEach(m -> m.getUser().setAvatar(webApp.getAvatarPublicUrl(m.getUser()))); + replies.forEach(m -> m.getUser().setAvatar(webApp.getAvatarWebPath(m.getUser()))); if (!visitor.isAnonymous()) { userService.updateLastSeen(visitor); applicationEventPublisher.publishEvent( |