mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:52:24 -05:00
Timeline improvements (#41)
Tidying up. Parent/child statuses now display correctly in status/id/context.
This commit is contained in:
parent
b4288f3c47
commit
82d9f88e42
39 changed files with 739 additions and 602 deletions
|
|
@ -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 := >smodel.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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue