From 43e443f9f3a2c5adaea38fa9267c41d42fa33d58 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:46:52 +0200 Subject: [PATCH] [bugfix] Carry-over "PinnedAt" when refreshing status (#3373) --- internal/federation/dereferencing/status.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/federation/dereferencing/status.go b/internal/federation/dereferencing/status.go index 28e9d0196..8ca5418f2 100644 --- a/internal/federation/dereferencing/status.go +++ b/internal/federation/dereferencing/status.go @@ -516,10 +516,12 @@ func (d *Dereferencer) enrichStatus( latestStatus.ID = status.ID } - // Carry-over values and set fetch time. - latestStatus.UpdatedAt = status.UpdatedAt + // Set latest fetch time and carry- + // over some values from "old" status. latestStatus.FetchedAt = time.Now() + latestStatus.UpdatedAt = status.UpdatedAt latestStatus.Local = status.Local + latestStatus.PinnedAt = status.PinnedAt // Carry-over approvals. Remote instances might not yet // serve statuses with the `approved_by` field, but we