rgsoc-teams icon indicating copy to clipboard operation
rgsoc-teams copied to clipboard

Can't update user avatar

Open mkalininait opened this issue 8 years ago • 7 comments

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?

mkalininait avatar Jul 07 '17 11:07 mkalininait

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.

carpodaster avatar Jul 07 '17 11:07 carpodaster

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!

yoasyo25 avatar Jan 10 '18 00:01 yoasyo25

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 āœŒļø

klappradla avatar Jan 10 '18 12:01 klappradla

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. šŸ‘

emcoding avatar Jan 11 '18 13:01 emcoding

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" šŸ¤”

klappradla avatar Jan 12 '18 09:01 klappradla

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

emcoding avatar Jan 12 '18 09:01 emcoding

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

  • [ ] Double check why /lib/github/user.rb#L20 does not return the current avatar if a user changed it on Github and investigate if there's maybe a different field that is the current avatar of if the user. Also: it could be that the gh gem we are using for this now provides some different means to get the user data.
  • [ ] If necessary, add a button to the user form to pull in the latest changes from Github (and add the respective description for the button šŸ˜‰ )

what we don't want: 🚫

  • avatar image upload (this should all be done on Github)
  • manually changing the avatar url (again, this should all be done on Github)

I hope that makes things a bit clearer 🚿

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

klappradla avatar Jan 14 '18 20:01 klappradla