Fix staticcheck
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
kolaente 2020-03-01 20:49:52 +01:00
parent 4a17557325
commit def48dcb72
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -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)