From 4624cbc4567990dc8155dee5b5f2ef6ec0289d84 Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Tue, 6 Jun 2023 03:59:27 -0500 Subject: [PATCH] [Fix] Fixed exceptions with `ACTIVITY_JOIN_REQUEST` + null user icon --- src/main/java/com/jagrosh/discordipc/IPCClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/jagrosh/discordipc/IPCClient.java b/src/main/java/com/jagrosh/discordipc/IPCClient.java index 5ca08c0..6f13f19 100644 --- a/src/main/java/com/jagrosh/discordipc/IPCClient.java +++ b/src/main/java/com/jagrosh/discordipc/IPCClient.java @@ -702,7 +702,7 @@ private void readPipe(final IPCClient instance) { u.getAsJsonPrimitive("username").getAsString(), u.getAsJsonPrimitive("discriminator").getAsString(), Long.parseLong(u.getAsJsonPrimitive("id").getAsString()), - u.has("avatar") ? u.getAsJsonPrimitive("avatar").getAsString() : null + u.has("avatar") && u.get("avatar").isJsonPrimitive() ? u.getAsJsonPrimitive("avatar").getAsString() : null ); listener.onActivityJoinRequest(instance, data.has("secret") ? data.getAsJsonObject("secret").getAsString() : null, user); break;