Skip to content
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

Gravatar integration #3378

Closed
madmath03 opened this issue Nov 27, 2020 · 4 comments
Closed

Gravatar integration #3378

madmath03 opened this issue Nov 27, 2020 · 4 comments
Labels
Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development

Comments

@madmath03
Copy link
Contributor

madmath03 commented Nov 27, 2020

Describe the problem to be solved

New users could get their profile picture retrieved automatically based on their email address.

Describe the solution you would like:

A Gravatar integration to PeerTube.
Of course, it should be possible to disable this integration in order to not send user email address to an external service.

Describe alternatives you have considered

It would probably be better as a plugin, but I'm not sure PeerTube currently has the hooks available for such a plugin.

@rigelk
Copy link
Collaborator

rigelk commented Nov 27, 2020

hi @madmath03 and thanks for the suggestion!

You might be interested by https://www.libravatar.org/ as an alternative.

Of course, it should be possible to disable this as it could violate some privacy policies.

I'm not sure we want privacy to be opt-in…

It would probably be better as a plugin, but I'm not sure PeerTube currently has the hooks available for such a plugin.

You are welcome to request the needed hooks.

@rigelk rigelk added the Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development label Nov 27, 2020
@madmath03
Copy link
Contributor Author

I'm not sure we want privacy to be opt-in…

What I meant is that we should be able to disable a Gravatar like integration because such integrations require to send the user email to an external service. Some instances might prefer to disable this feature to keep their email fully private.

I will rephrase the description.

You are welcome to request the needed hooks.

I'm still discovering PeerTube so I might be wrong and I'm not sure what's the best approach so feel free to comment the following proposal:

Solution would be to have some kind of getAvatar hook that would be called before getting a user's avatar:

  • The default hook provided by PeerTube should simply retrieve the "local" avatar (as-is), while plugins could do something else...
  • The hook should provide all information about the user account (username, email, role, ...) to the registered function. A Gravatar or Libravatar integration would only need the email, but someone might want to build a plugin to return a default avatar based on the user role or generate an avatar based on hash of the profile like Identicon does.
  • The resulting avatar should probably be cached to prevent a call to an external service on every request. Maybe PeerTube should provide a new global setting to define the time of this cache.

Reference: https://github.com/Chocobozzz/PeerTube/blob/develop/support/doc/plugins/guide.md#hooks

What do you think @rigelk ? Is that a good enough solution and description for such a hook ?
Should this be kept here or moved into a separate issue ?

@Chocobozzz
Copy link
Owner

Hello,

If you interested in developing such plugin but you're missing hooks/API, please create dedicated issues.

@madmath03
Copy link
Contributor Author

Hello,

If you interested in developing such plugin but you're missing hooks/API, please create dedicated issues.

It was not a matter of available hooks or API, but a matter of time.
This issue/feature request should still be relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development
Projects
None yet
Development

No branches or pull requests

3 participants