Remove user field (not used) and bestRank field (will be assumed by the client) from login info

This commit is contained in:
Colin McDonald 2016-06-26 23:27:36 -04:00
parent 9110acd14a
commit 74f23bcb62
1 changed files with 4 additions and 2 deletions

View File

@ -262,8 +262,10 @@ public final class User {
Map<String, Object> result = new HashMap<>();
List<Rank> ranks = getRanksScoped(serverGroup, grants);
result.put("user", this);
result.put("bestRank", ranks.get(0).getId());
// Currently, we exclude this from login info. We do still do the relevant
// db query, but we don't include the result because it's not used in
// Hydrogen at all (bnut probably will be later on)
// result.put("user", this);
result.put("ranks", ranks.stream().map(Rank::getId).collect(Collectors.toList()));
if (activeMute != null) {