Fix staticcheck
continuous-integration/drone/pr Build was killed
Details
continuous-integration/drone/pr Build was killed
Details
This commit is contained in:
parent
4a17557325
commit
def48dcb72
|
@ -51,7 +51,7 @@ func (g *Provider) GetAvatar(user *user.User, size int64) ([]byte, string, error
|
|||
if exists {
|
||||
// elaped is alway < 0 so the next check would always succeed.
|
||||
// To have it make sense, we flip that.
|
||||
elapsed := a.loadedAt.Sub(time.Now()) * -1
|
||||
elapsed := time.Until(a.loadedAt) * -1
|
||||
needsRefetch = elapsed > time.Duration(config.ServiceGravatarExpiration.GetInt64())*time.Second
|
||||
if needsRefetch {
|
||||
log.Debugf("Refetching avatar for user %d after %v", user.ID, elapsed)
|
||||
|
|
Loading…
Reference in New Issue