rails-girls-summer-of-code / rgsoc-teams

Teams management and activity
https://teams.railsgirlssummerofcode.org
MIT License
68 stars 140 forks source link

Can't update user avatar #781

Open mkalininait opened 7 years ago

mkalininait commented 7 years ago

There is a problem that users can't update their avatars in the Teams app. If you didn't have an avatar in your GH profile once you signed up in the Team app, you can't add it to the Teams app later. We already had 3 or 4 requests this year to update students' avatars, and I had to manually add the urls in the DB.

I wonder if we could make an "Update avatar from GH" button or just implement a "Add/Change photo" function. Any thoughts?

carpodaster commented 7 years ago

I'm curious why lib/github/user.rb:19 does not return a valid URL that always returns the current avatar. Apparently the URL changes when an upload is made. Maybe there is non-changing URL in the returned datastructure or there is an update for omniauth.

If not, I'd vote for the "Update avatar from GH" and not having custom uploads.

yoasyo25 commented 6 years ago

Hi there! Iā€™m a first-time contributor and was hoping to help out with this issue. I noticed nobody was assigned to it and Iā€™m happy to try helping out. Thanks!

klappradla commented 6 years ago

Hey @yoasyo25 šŸ‘‹ awesome that you wanna help and welcome to the Teams App šŸ’š

And yes, this issue is free to grab (I don't remember anyone working on it), so feel free to try fixing it! If you need any help or any further information, just ping us here šŸ“ž

Small sidenote, since this may eventually not be obvious from the issue's title and description: we don't want to add an upload mechanism for avatars (as @carpodaster wrote in his comment šŸ‘† ) but rather "just" have the app pull in the right and updated image from Github āœŒļø

emcoding commented 6 years ago

I doublechecked the issue. Currently, after a user changed their avatar on GH, they have to sign out from GH and sign back in, and then the avatar will be updated in the Teams app. So, the updating logic works, we just need the button to trigger a refresh. šŸ‘

klappradla commented 6 years ago

Thanx for the update @F3PiX šŸ™

Maybe we can also check for updates on GH's side periodically or when the user gets a new session or something along the lines of this to not have "just another button" šŸ¤”

emcoding commented 6 years ago

That sounds great. What implementation would be the simplest? I'd think the button is easier? What do you think?

klappradla commented 6 years ago

So, @yoasyo25 & @F3PiX just a quick summary of what has been said here in the conversation to get you started @yoasyo25 šŸš€

what we don't want: šŸš«

I hope that makes things a bit clearer šŸšæ

Feel free to ping us if you got any more questions @yoasyo25 āœŒļø