Retain connected account order from the Discord API
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 1m0s
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 1m0s
This commit is contained in:
parent
280b89b7cf
commit
3516fbc273
@ -4,10 +4,7 @@ import kong.unirest.core.json.JSONArray;
|
||||
import kong.unirest.core.json.JSONObject;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* A linked connection to a {@link DiscordUser}.
|
||||
@ -49,7 +46,7 @@ public class ConnectedAccount {
|
||||
*/
|
||||
@NonNull
|
||||
public static Set<ConnectedAccount> fromJson(@NonNull JSONObject userJson) {
|
||||
Set<ConnectedAccount> connectedAccounts = new HashSet<>();
|
||||
Set<ConnectedAccount> connectedAccounts = new LinkedHashSet<>();
|
||||
if (userJson.has("connected_accounts")) {
|
||||
JSONArray accountsArray = userJson.getJSONArray("connected_accounts");
|
||||
for (int i = 0; i < accountsArray.length(); i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user