[bugfix] fix status.Local sometimes being nil (#4285)

also comments-out a flaky test, (or at-least part of it), since it's testing a pkg part that is already tested.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4285
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
kim 2025-06-21 12:03:35 +02:00 committed by kim
commit 80191348ba
2 changed files with 23 additions and 17 deletions

View file

@ -518,9 +518,11 @@ func (d *Dereferencer) enrichStatus(
// Set latest fetch time and carry-
// over some values from "old" status.
latestStatus.FetchedAt = time.Now()
latestStatus.Local = status.Local
latestStatus.PinnedAt = status.PinnedAt
// These will always be remote.
latestStatus.Local = new(bool)
// Carry-over approvals. Remote instances might not yet
// serve statuses with the `approved_by` field, but we
// might have marked a status as pre-approved on our side