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 #1043

Closed
fey opened this issue Jul 22, 2021 · 2 comments · Fixed by #1137
Closed

Добавить поддержку gravatar #1043

fey opened this issue Jul 22, 2021 · 2 comments · Fixed by #1137

Comments

@fey
Copy link
Collaborator

fey commented Jul 22, 2021

Добавить поддержку граватар, если у пользователя нет аватара
Или добавить опцию выбора откуда загружать аватар (граватар или условный гитхаб)

@vtm9
Copy link
Contributor

vtm9 commented Sep 3, 2022

  def avatar_url(user) do
    cond do
      user.github_id ->
        "https://avatars0.githubusercontent.com/u/#{user.github_id}"

      user.discord_id ->
        "https://cdn.discordapp.com/avatars/#{user.discord_id}/#{user.discord_avatar}.png"

      true ->
        "https://avatars0.githubusercontent.com/u/35539033"
    end
  end

@vtm9
Copy link
Contributor

vtm9 commented Sep 3, 2022

нужно добавить на беке еще один cond, после дискорда, если есть email посчитать md5 и сделать gravatar_url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants