summaryrefslogtreecommitdiff
path: root/internal/processing/account/rss.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-08-02 12:15:11 +0000
committerLibravatar GitHub <noreply@github.com>2024-08-02 13:15:11 +0100
commit0f734a24100383171a866fccc194dea578141d74 (patch)
treea2cfdebeb1098ef39a8b2907a0933ac7f18a3ca3 /internal/processing/account/rss.go
parent[chore] add back exif-terminator and use only for jpeg,png,webp (#3161) (diff)
downloadgotosocial-0f734a24100383171a866fccc194dea578141d74.tar.xz
[chore] move PopulateAccountStats() nil check often performed into function itself (#3158)
* move PopulateAccountStats() nil check often performed into function itself * fix test to take in mind we don't repopulate account stats if not-nil
Diffstat (limited to 'internal/processing/account/rss.go')
-rw-r--r--internal/processing/account/rss.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/processing/account/rss.go b/internal/processing/account/rss.go
index cbbb4875b..60f93b012 100644
--- a/internal/processing/account/rss.go
+++ b/internal/processing/account/rss.go
@@ -70,11 +70,9 @@ func (p *Processor) GetRSSFeedForUsername(ctx context.Context, username string)
}
// Ensure account stats populated.
- if account.Stats == nil {
- if err := p.state.DB.PopulateAccountStats(ctx, account); err != nil {
- err = gtserror.Newf("db error getting account stats %s: %w", username, err)
- return nil, never, gtserror.NewErrorInternalError(err)
- }
+ if err := p.state.DB.PopulateAccountStats(ctx, account); err != nil {
+ err = gtserror.Newf("db error getting account stats %s: %w", username, err)
+ return nil, never, gtserror.NewErrorInternalError(err)
}
// LastModified time is needed by callers to check freshness for cacheing.