Skip to content

RM-337: Show default avatar for gallery submitters without one - #156

Merged
BenHall-1 merged 1 commit into
masterfrom
fix-gallery-avatars-missing
Sep 27, 2026
Merged

BenHall-1 merged 1 commit into
masterfrom
fix-gallery-avatars-missing

Conversation

@biast12

@biast12 biast12 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

RM-337

Description

Gallery submitters without a custom Discord avatar had no image rendered, so on the admin gallery card "by" ran into the username (e.g. "bybiast12"). The backend omits avatar_url for these users.

Every place that shows the submitter now always renders an avatar via userAvatarUrl, which falls back to Discord's default avatar for the user's ID (same approach as BlacklistAvatar in #153):

  • Admin gallery card
  • Gallery preview modal ("Submitted by")
  • Public gallery card
  • Public listing page (replaces the generic user icon)

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

  • /admin/gallery: a submission from a user with no custom avatar shows "by [default avatar] username · date"; Preview modal shows the same avatar
  • /gallery card and /gallery/:id show the default avatar; users with a custom avatar still show theirs

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Centralizes gallery submitter avatar rendering through userAvatarUrl so users without stored avatar URLs still display their Discord avatar consistently across cards, previews, admin listings, and detail pages.
@biast12
biast12 requested a review from a team as a code owner September 26, 2026 20:07
@github-actions github-actions Bot added the type:bug Bug Fixes label Sep 26, 2026
@BenHall-1
BenHall-1 merged commit 81e3656 into master Sep 27, 2026
3 checks passed
@BenHall-1
BenHall-1 deleted the fix-gallery-avatars-missing branch September 27, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants