diff --git a/internal/api/client/search/searchget.go b/internal/api/client/search/searchget.go index 10c1d6193..1e2694673 100644 --- a/internal/api/client/search/searchget.go +++ b/internal/api/client/search/searchget.go @@ -128,16 +128,16 @@ func (m *Module) SearchGETHandler(c *gin.Context) { } searchQuery := &model.SearchQuery{ - AccountID: accountID, - MaxID: maxID, - MinID: minID, - Type: searchType, + AccountID: accountID, + MaxID: maxID, + MinID: minID, + Type: searchType, ExcludeUnreviewed: excludeUnreviewed, - Query: query, - Resolve: resolve, - Limit: limit, - Offset: offset, - Following: following, + Query: query, + Resolve: resolve, + Limit: limit, + Offset: offset, + Following: following, } results, errWithCode := m.processor.SearchGet(authed, searchQuery) diff --git a/internal/db/pg/pg.go b/internal/db/pg/pg.go index 92aa2849a..f352404aa 100644 --- a/internal/db/pg/pg.go +++ b/internal/db/pg/pg.go @@ -1148,7 +1148,6 @@ func (ps *postgresService) GetNotificationsForAccount(accountID string, limit in q := ps.conn.Model(¬ifications).Where("target_account_id = ?", accountID) - if maxID != "" { n := >smodel.Notification{} if err := ps.conn.Model(n).Where("id = ?", maxID).Select(); err != nil { diff --git a/internal/message/fromfederatorprocess.go b/internal/message/fromfederatorprocess.go index 28ba4430b..b070cc46d 100644 --- a/internal/message/fromfederatorprocess.go +++ b/internal/message/fromfederatorprocess.go @@ -409,7 +409,7 @@ func (p *processor) dereferenceAnnounce(announce *gtsmodel.Status, requestingUse } // now dereference additional fields straight away (we're already async here so we have time) - if err := p.dereferenceStatusFields(boostedStatus, requestingUsername); err != nil { + if err := p.dereferenceStatusFields(boostedStatus, requestingUsername); err != nil { return fmt.Errorf("dereferenceAnnounce: error dereferencing status fields for status with id %s: %s", announce.GTSBoostedStatus.URI, err) } diff --git a/internal/message/searchprocess.go b/internal/message/searchprocess.go index e4e96637b..5634ab51f 100644 --- a/internal/message/searchprocess.go +++ b/internal/message/searchprocess.go @@ -228,7 +228,7 @@ func (p *processor) searchAccountByMention(authed *oauth.Auth, mention string, r // if it's a local account we can skip a whole bunch of stuff maybeAcct := >smodel.Account{} if domain == p.config.Host { - if p.db.GetLocalAccountByUsername(username, maybeAcct); err != nil { + if err = p.db.GetLocalAccountByUsername(username, maybeAcct); err != nil { return } foundAccount = maybeAcct diff --git a/internal/typeutils/converter.go b/internal/typeutils/converter.go index 9cd7ad9b4..ab680fbdd 100644 --- a/internal/typeutils/converter.go +++ b/internal/typeutils/converter.go @@ -145,7 +145,7 @@ type TypeConverter interface { /* WRAPPER CONVENIENCE FUNCTIONS */ - + // WrapPersonInUpdate WrapPersonInUpdate(person vocab.ActivityStreamsPerson, originAccount *gtsmodel.Account) (vocab.ActivityStreamsUpdate, error) } diff --git a/internal/typeutils/internal.go b/internal/typeutils/internal.go index 3110b382c..626509b34 100644 --- a/internal/typeutils/internal.go +++ b/internal/typeutils/internal.go @@ -40,10 +40,10 @@ func (c *converter) StatusToBoost(s *gtsmodel.Status, boostingAccount *gtsmodel. URL: boostWrapperStatusURL, // the boosted status is not created now, but the boost certainly is - CreatedAt: time.Now(), - UpdatedAt: time.Now(), - Local: local, - AccountID: boostingAccount.ID, + CreatedAt: time.Now(), + UpdatedAt: time.Now(), + Local: local, + AccountID: boostingAccount.ID, // replies can be boosted, but boosts are never replies InReplyToID: "",