Skip to content

Conversation

@HeapReaper
Copy link
Contributor

@HeapReaper HeapReaper commented Oct 12, 2025


Homarr

Thank you for your contribution. Please ensure that your pull request meets the following pull request:

  • Builds without warnings or errors (pnpm build, autofix with pnpm format:fix)
  • Pull request targets dev branch
  • Commits follow the conventional commits guideline
  • No shorthand variable names are used (eg. x, y, i or any abbrevation)
  • Documentation is up to date. Create a pull request here.

Closes #2783

@HeapReaper HeapReaper requested a review from a team as a code owner October 12, 2025 14:42
@deepsource-io
Copy link
Contributor

deepsource-io bot commented Oct 12, 2025

Here's the code health analysis summary for commits 3fff8b8..d8f2f92. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link
Member

@Meierschlumpf Meierschlumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we should add the email to all the usages of UserAvatar so it doesn't only work for the current user

email: currentSession?.user.email ?? null,
};

if (!user.image && !user.email && user.name) user.image = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this? Can you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's redundant because of ?? null inside const user:.
I can remove that part yeah

Comment on lines +25 to +28
if (user.email) {
const emailHash = createHash("md5").update(user.email.trim().toLowerCase()).digest("hex");
return <Avatar src={`https://seccdn.libravatar.org/avatar/${emailHash}?d=404`} alt={user.name} size={size} />;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to check if the usage of crypto actually works

@Meierschlumpf Meierschlumpf added the enhancement New feature or request label Oct 12, 2025
@Meierschlumpf Meierschlumpf changed the title Added gravatar support, Resolves #2783 feat(users): add libravatar / gravatar support Oct 12, 2025
@HeapReaper
Copy link
Contributor Author

HeapReaper commented Oct 12, 2025

Also we should add the email to all the usages of UserAvatar so it doesn't only work for the current user

I did add an extra user and the Libravatar/Gravatar works fine for that user too. I could be missing smth tho
image

@Meierschlumpf
Copy link
Member

What I mean is that there are a lot of other user avatars that should also have the email always available, so you should make the email property required and add it to the missing places:

image

@HeapReaper
Copy link
Contributor Author

Ah like that, fair. Gonna add it!

@manuel-rw
Copy link
Member

Can you also add a toggle (setting) that enables Gravatar? Some people may not want it.

@HeapReaper
Copy link
Contributor Author

What I mean is that there are a lot of other user avatars that should also have the email always available, so you should make the email property required and add it to the missing places:
image

Atm working on it

@HeapReaper HeapReaper closed this Nov 4, 2025
@HeapReaper HeapReaper reopened this Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: gravatar

3 participants