summaryrefslogtreecommitdiff
path: root/internal/timeline/prepare.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/timeline/prepare.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/timeline/prepare.go')
-rw-r--r--internal/timeline/prepare.go18
1 files changed, 1 insertions, 17 deletions
diff --git a/internal/timeline/prepare.go b/internal/timeline/prepare.go
index 1fb1cd714..cd740993c 100644
--- a/internal/timeline/prepare.go
+++ b/internal/timeline/prepare.go
@@ -163,24 +163,8 @@ func (t *timeline) prepare(statusID string) error {
t.account = timelineOwnerAccount
}
- // to convert the status we need relevant accounts from it, so pull them out here
- relevantAccounts, err := t.db.PullRelevantAccountsFromStatus(gtsStatus)
- if err != nil {
- return err
- }
-
- // check if this is a boost...
- var reblogOfStatus *gtsmodel.Status
- if gtsStatus.BoostOfID != "" {
- s := &gtsmodel.Status{}
- if err := t.db.GetByID(gtsStatus.BoostOfID, s); err != nil {
- return err
- }
- reblogOfStatus = s
- }
-
// serialize the status (or, at least, convert it to a form that's ready to be serialized)
- apiModelStatus, err := t.tc.StatusToMasto(gtsStatus, relevantAccounts.StatusAuthor, t.account, relevantAccounts.BoostedAccount, relevantAccounts.ReplyToAccount, reblogOfStatus)
+ apiModelStatus, err := t.tc.StatusToMasto(gtsStatus, t.account)
if err != nil {
return err
}