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

View File

@ -262,8 +262,10 @@ public final class User {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
List<Rank> ranks = getRanksScoped(serverGroup, grants); List<Rank> ranks = getRanksScoped(serverGroup, grants);
result.put("user", this); // Currently, we exclude this from login info. We do still do the relevant
result.put("bestRank", ranks.get(0).getId()); // 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())); result.put("ranks", ranks.stream().map(Rank::getId).collect(Collectors.toList()));
if (activeMute != null) { if (activeMute != null) {