mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-24 12:33:31 -06:00
more dicking abuot
This commit is contained in:
parent
60ee05d2a7
commit
6ef4cc36b2
9 changed files with 176 additions and 71 deletions
|
|
@ -1217,6 +1217,31 @@ func (c *Converter) StatusToWebStatus(
|
|||
// Mark local.
|
||||
webStatus.Local = *s.Local
|
||||
|
||||
// Get edit history for this status.
|
||||
if webStatus.EditedAt != nil {
|
||||
if len(s.Edits) != len(s.EditIDs) {
|
||||
s.Edits, err = c.state.DB.GetStatusEditsByIDs(ctx, s.EditIDs)
|
||||
if err != nil && !errors.Is(err, db.ErrNoEntries) {
|
||||
err := gtserror.Newf("db error getting status edits: %w", err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
for _, edit := range s.Edits {
|
||||
webStatus.EditTimeline = append(
|
||||
webStatus.EditTimeline,
|
||||
util.FormatISO8601(edit.CreatedAt),
|
||||
)
|
||||
}
|
||||
|
||||
webStatus.EditTimeline = append(
|
||||
webStatus.EditTimeline,
|
||||
*webStatus.EditedAt,
|
||||
)
|
||||
|
||||
slices.Reverse(webStatus.EditTimeline)
|
||||
}
|
||||
|
||||
// Set additional templating
|
||||
// variables on media attachments.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue