Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Invalid avatar images

Open someone13574 opened this issue 2 years ago • 1 comments

Some users who account is linked to a discord account have an avatar image which is pointing to an invalid image. This results in the text "User's avatar" which overlaps their username on the leader board. Here's an image:

image

It can be viewed simply by going to the overall leader board where there are three examples of the broken avatars.

someone13574 avatar Mar 06 '23 00:03 someone13574

I can take care of this one

owenduncansnobel avatar Mar 06 '23 01:03 owenduncansnobel

Ok after a bit of digging, these are the callbacks that are called when a user logs in (using discord), in this order:

signIn callback
jwt
signIn event

Whenever a user does a full page navigation, the following gets called:

jwt
session
jwt
session

I assume 2 times because SSR + browser.

It does not seem like we have a lot of options for refreshing the user's Image, our session is 30 days, and unless the user does not open the website in 30 days, login will never be called.

At the same time, updating the user's image on every session would be too aggressive, we need to find a middleground.

AbdBarho avatar Mar 08 '23 06:03 AbdBarho