aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Users.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Users.java b/juick-server/src/main/java/com/juick/server/api/Users.java
index a7ea7ea0..9a2b25d7 100644
--- a/juick-server/src/main/java/com/juick/server/api/Users.java
+++ b/juick-server/src/main/java/com/juick/server/api/Users.java
@@ -78,6 +78,8 @@ public class Users {
me.setName(visitor.getName());
me.setAuthHash(getAuthToken());
me.setUnreadCount(messagesService.getUnread(visitor).size());
+ me.setRead(userService.getUserFriends(visitor.getUid()));
+ me.setReaders(userService.getUserReaders(visitor.getUid()));
return me;
}
@@ -101,13 +103,7 @@ public class Users {
}
if (uid > 0) {
- List<Integer> uids = userService.getUserRead(uid);
- if (uids.size() > 0) {
- List<com.juick.User> users = userService.getUsersByID(uids);
- if (users.size() > 0) {
- return users;
- }
- }
+ return userService.getUserFriends(uid);
}
throw new HttpNotFoundException();
}