Skip to content

Commit

Permalink
fix(Interaction.java): replaced (String) value with String.valueOf(va…
Browse files Browse the repository at this point in the history
…lue) when determining the value of an authorizing_integration_owners array object

this was causing a cast exception when that value was an integer
  • Loading branch information
seailz committed Apr 15, 2024
1 parent 4f901ce commit 5343599
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -266,7 +266,8 @@ public static Interaction decompile(JSONObject json, DiscordJar discordJar) thro
authIntegrationOwners = new HashMap<>();
JSONObject authIntegrationOwnersJson = json.getJSONObject("authorizing_integration_owners");
for (String code : authIntegrationOwnersJson.keySet()) {
authIntegrationOwners.put(IntegrationType.fromCode(Integer.parseInt(code)), authIntegrationOwnersJson.getString(code));

authIntegrationOwners.put(IntegrationType.fromCode(Integer.parseInt(code)), String.valueOf(authIntegrationOwnersJson.get(code)));
}
}

Expand Down

0 comments on commit 5343599

Please sign in to comment.