diff options
Diffstat (limited to 'internal/processing/synchronous/status/fave.go')
-rw-r--r-- | internal/processing/synchronous/status/fave.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/internal/processing/synchronous/status/fave.go b/internal/processing/synchronous/status/fave.go index b4622abbc..23f0d2944 100644 --- a/internal/processing/synchronous/status/fave.go +++ b/internal/processing/synchronous/status/fave.go @@ -26,12 +26,6 @@ func (p *processor) Fave(account *gtsmodel.Account, targetStatusID string) (*api return nil, gtserror.NewErrorNotFound(fmt.Errorf("error fetching target account %s: %s", targetStatus.AccountID, err)) } - l.Trace("going to get relevant accounts") - relevantAccounts, err := p.db.PullRelevantAccountsFromStatus(targetStatus) - if err != nil { - return nil, gtserror.NewErrorNotFound(fmt.Errorf("error fetching related accounts for status %s: %s", targetStatusID, err)) - } - var boostOfStatus *gtsmodel.Status if targetStatus.BoostOfID != "" { boostOfStatus = >smodel.Status{} @@ -41,7 +35,7 @@ func (p *processor) Fave(account *gtsmodel.Account, targetStatusID string) (*api } l.Trace("going to see if status is visible") - visible, err := p.db.StatusVisible(targetStatus, account, relevantAccounts) // requestingAccount might well be nil here, but StatusVisible knows how to take care of that + visible, err := p.filter.StatusVisible(targetStatus, account) // requestingAccount might well be nil here, but StatusVisible knows how to take care of that if err != nil { return nil, gtserror.NewErrorNotFound(fmt.Errorf("error seeing if status %s is visible: %s", targetStatus.ID, err)) } @@ -98,7 +92,7 @@ func (p *processor) Fave(account *gtsmodel.Account, targetStatusID string) (*api } // return the mastodon representation of the target status - mastoStatus, err := p.tc.StatusToMasto(targetStatus, targetAccount, account, relevantAccounts.BoostedAccount, relevantAccounts.ReplyToAccount, boostOfStatus) + mastoStatus, err := p.tc.StatusToMasto(targetStatus, account) if err != nil { return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting status %s to frontend representation: %s", targetStatus.ID, err)) } |