Skip to content

fix(auth): fix authentification issue when user has no avatar#247

Merged
Akinator31 merged 1 commit intomainfrom
246-fix-login-failure-for-users-without-a-profile-picture
Nov 24, 2025
Merged

fix(auth): fix authentification issue when user has no avatar#247
Akinator31 merged 1 commit intomainfrom
246-fix-login-failure-for-users-without-a-profile-picture

Conversation

@Akinator31
Copy link
Copy Markdown
Member

This pull request updates the handling of Discord user avatars, allowing for users without a custom avatar to be supported. The migration modifies the database schema to allow avatar_hash to be nullable, and the API handler logic now correctly generates a default avatar URL when no custom hash is present.

Database schema update:

  • Modified the sessions_panel table to allow avatar_hash to be NULL, enabling support for users without a Discord avatar.

API handler improvements:

  • Updated the avatar retrieval logic in handle_get_user_avatar to treat avatar_hash as an Option<String>, handling cases where the value is missing.
  • Added logic to generate a default Discord avatar URL when avatar_hash is None, based on the user ID.

@Akinator31 Akinator31 self-assigned this Nov 24, 2025
@Akinator31 Akinator31 linked an issue Nov 24, 2025 that may be closed by this pull request
@Akinator31 Akinator31 merged commit 0464229 into main Nov 24, 2025
6 checks passed
@Akinator31 Akinator31 deleted the 246-fix-login-failure-for-users-without-a-profile-picture branch November 24, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix login failure for users without a profile picture

1 participant