summaryrefslogtreecommitdiff
path: root/internal/processing/account.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-06-17 18:02:33 +0200
committerLibravatar GitHub <noreply@github.com>2021-06-17 18:02:33 +0200
commit82d9f88e424fffacfa9a9c1c26f2f702b97f3e3a (patch)
tree60379f8eb809e9019222f67a13b547e4a26bfc83 /internal/processing/account.go
parentTimeline manager (#40) (diff)
downloadgotosocial-82d9f88e424fffacfa9a9c1c26f2f702b97f3e3a.tar.xz
Timeline improvements (#41)
Tidying up. Parent/child statuses now display correctly in status/id/context.
Diffstat (limited to 'internal/processing/account.go')
-rw-r--r--internal/processing/account.go30
1 files changed, 2 insertions, 28 deletions
diff --git a/internal/processing/account.go b/internal/processing/account.go
index 870734184..0e7dbbad3 100644
--- a/internal/processing/account.go
+++ b/internal/processing/account.go
@@ -222,12 +222,7 @@ func (p *processor) AccountStatusesGet(authed *oauth.Auth, targetAccountID strin
}
for _, s := range statuses {
- relevantAccounts, err := p.db.PullRelevantAccountsFromStatus(&s)
- if err != nil {
- return nil, gtserror.NewErrorInternalError(fmt.Errorf("error getting relevant statuses: %s", err))
- }
-
- visible, err := p.db.StatusVisible(&s, authed.Account, relevantAccounts)
+ visible, err := p.filter.StatusVisible(&s, authed.Account)
if err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error checking status visibility: %s", err))
}
@@ -235,28 +230,7 @@ func (p *processor) AccountStatusesGet(authed *oauth.Auth, targetAccountID strin
continue
}
- var boostedStatus *gtsmodel.Status
- if s.BoostOfID != "" {
- bs := &gtsmodel.Status{}
- if err := p.db.GetByID(s.BoostOfID, bs); err != nil {
- return nil, gtserror.NewErrorInternalError(fmt.Errorf("error getting boosted status: %s", err))
- }
- boostedRelevantAccounts, err := p.db.PullRelevantAccountsFromStatus(bs)
- if err != nil {
- return nil, gtserror.NewErrorInternalError(fmt.Errorf("error getting relevant accounts from boosted status: %s", err))
- }
-
- boostedVisible, err := p.db.StatusVisible(bs, authed.Account, boostedRelevantAccounts)
- if err != nil {
- return nil, gtserror.NewErrorInternalError(fmt.Errorf("error checking boosted status visibility: %s", err))
- }
-
- if boostedVisible {
- boostedStatus = bs
- }
- }
-
- apiStatus, err := p.tc.StatusToMasto(&s, targetAccount, authed.Account, relevantAccounts.BoostedAccount, relevantAccounts.ReplyToAccount, boostedStatus)
+ apiStatus, err := p.tc.StatusToMasto(&s, authed.Account)
if err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting status to masto: %s", err))
}