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

how to check user.avatar.present? #29

Closed
yournumberone opened this issue Apr 17, 2021 · 1 comment · Fixed by #31
Closed

how to check user.avatar.present? #29

yournumberone opened this issue Apr 17, 2021 · 1 comment · Fixed by #31

Comments

@yournumberone
Copy link

https://github.com/adaoraul/omniauth-discord/blob/b8d9789170c988250401c4c81b97cb90a0c0d1e1/lib/omniauth/strategies/discord.rb#L23
if user has not an avatar it saves only half of link

@seckenrode
Copy link
Contributor

As a workaround, you can access auth.extra["raw_info"]["avatar"] which will contain the raw avatar hash from Discord. You can use this to see if Discord gave you a nil value and handle this downstream in your application using that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants