Retain badge order from the Discord API
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 1m1s
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 1m1s
This commit is contained in:
parent
e90b672918
commit
113f160080
@ -5,7 +5,7 @@ import kong.unirest.core.json.JSONObject;
|
||||
import lombok.*;
|
||||
import me.braydon.tether.model.user.DiscordUser;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@ -43,7 +43,7 @@ public class UserBadge {
|
||||
*/
|
||||
@NonNull
|
||||
public static Set<UserBadge> fromJson(@NonNull JSONObject userJson) {
|
||||
Set<UserBadge> badges = new HashSet<>();
|
||||
Set<UserBadge> badges = new LinkedHashSet<>();
|
||||
if (!userJson.has("badges")) {
|
||||
return badges;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user