-
-
Notifications
You must be signed in to change notification settings - Fork 109
feat(users): add libravatar / gravatar support #4277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this 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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
| 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} />; | ||
| } |
There was a problem hiding this comment.
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
|
Ah like that, fair. Gonna add it! |
|
Can you also add a toggle (setting) that enables Gravatar? Some people may not want it. |



Homarr
Thank you for your contribution. Please ensure that your pull request meets the following pull request:
pnpm build, autofix withpnpm format:fix)devbranchx,y,ior any abbrevation)Closes #2783