From 3136f637df56a35691a1fcddcd44ccd7dfdb4ed3 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Sat, 31 May 2025 14:09:17 -0400 Subject: [PATCH] Fix discord user schema (#969) ## Description: Update the discord user zod schema to address login failures for users without avatars. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com> --- src/core/ApiSchemas.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ApiSchemas.ts b/src/core/ApiSchemas.ts index 112ddc8b9..ebb8dc99b 100644 --- a/src/core/ApiSchemas.ts +++ b/src/core/ApiSchemas.ts @@ -34,11 +34,11 @@ export type TokenPayload = z.infer; export const UserMeResponseSchema = z.object({ user: z.object({ id: z.string(), - avatar: z.string(), + avatar: z.string().nullable(), username: z.string(), - global_name: z.string(), + global_name: z.string().nullable(), discriminator: z.string(), - locale: z.string(), + locale: z.string().optional(), }), player: z.object({ publicId: z.string(),