move status.EditID setting into handleStatusEdit()

This commit is contained in:
kim 2025-01-06 17:01:08 +00:00
parent d5e2611821
commit d7cba23f6f

View file

@ -520,8 +520,6 @@ func (d *Dereferencer) enrichStatus(
latestStatus.FetchedAt = time.Now()
latestStatus.Local = status.Local
latestStatus.PinnedAt = status.PinnedAt
latestStatus.EditIDs = status.EditIDs
latestStatus.Edits = status.Edits
// Carry-over approvals. Remote instances might not yet
// serve statuses with the `approved_by` field, but we
@ -1143,6 +1141,10 @@ func (d *Dereferencer) handleStatusEdit(
) {
var edited bool
// Copy previous status edit columns.
status.EditIDs = existing.EditIDs
status.Edits = existing.Edits
// Preallocate max slice length.
cols = make([]string, 1, 13)