change error message a bit

This commit is contained in:
tsmethurst 2021-10-18 16:07:18 +02:00
commit e94c686dc5
2 changed files with 2 additions and 2 deletions

View file

@ -114,7 +114,7 @@ func (p *processor) ConfirmEmail(ctx context.Context, token string) (*gtsmodel.U
}
if user.ConfirmationSentAt.Before(time.Now().Add(-oneWeek)) {
return nil, gtserror.NewErrorForbidden(errors.New("confirmation token more than a week old, please request a new one"))
return nil, gtserror.NewErrorForbidden(errors.New("ConfirmEmail: confirmation token expired"))
}
// mark the user's email address as confirmed + remove the unconfirmed address and the token