diff options
author | 2021-06-17 18:02:33 +0200 | |
---|---|---|
committer | 2021-06-17 18:02:33 +0200 | |
commit | 82d9f88e424fffacfa9a9c1c26f2f702b97f3e3a (patch) | |
tree | 60379f8eb809e9019222f67a13b547e4a26bfc83 /internal/processing/synchronous/status/get.go | |
parent | Timeline manager (#40) (diff) | |
download | gotosocial-82d9f88e424fffacfa9a9c1c26f2f702b97f3e3a.tar.xz |
Timeline improvements (#41)
Tidying up.
Parent/child statuses now display correctly in status/id/context.
Diffstat (limited to 'internal/processing/synchronous/status/get.go')
-rw-r--r-- | internal/processing/synchronous/status/get.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/internal/processing/synchronous/status/get.go b/internal/processing/synchronous/status/get.go index 7dbbb4e7d..9a70185b0 100644 --- a/internal/processing/synchronous/status/get.go +++ b/internal/processing/synchronous/status/get.go @@ -24,14 +24,8 @@ func (p *processor) Get(account *gtsmodel.Account, targetStatusID string) (*apim 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)) - } - 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)) } @@ -48,7 +42,7 @@ func (p *processor) Get(account *gtsmodel.Account, targetStatusID string) (*apim } } - 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)) } |