aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/api/Messages.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/api/Messages.java')
-rw-r--r--src/main/java/com/juick/server/api/Messages.java10
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 4ce1ea13..e105890f 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.getAvatarWebPath(m.getUser())));
+ msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarUrl(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.getAvatarWebPath(m.getUser())));
+ msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarUrl(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.getAvatarWebPath(m.getUser())));
+ msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarUrl(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.getAvatarWebPath(msg.getUser()));
+ msg.getUser().setAvatar(webApp.getAvatarUrl(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.getAvatarWebPath(m.getUser())));
+ replies.forEach(m -> m.getUser().setAvatar(webApp.getAvatarUrl(m.getUser())));
if (!visitor.isAnonymous()) {
userService.updateLastSeen(visitor);
applicationEventPublisher.publishEvent(