summaryrefslogtreecommitdiff
path: root/internal/processing/workers
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/workers')
-rw-r--r--internal/processing/workers/fromfediapi.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/internal/processing/workers/fromfediapi.go b/internal/processing/workers/fromfediapi.go
index 0d6ec1836..096e285f6 100644
--- a/internal/processing/workers/fromfediapi.go
+++ b/internal/processing/workers/fromfediapi.go
@@ -762,7 +762,7 @@ func (p *fediAPI) UpdateAccount(ctx context.Context, fMsg *messages.FromFediAPI)
account,
apubAcc,
- // Force refresh within 10s window.
+ // Force refresh within 5s window.
//
// Missing account updates could be
// detrimental to federation if they
@@ -917,17 +917,25 @@ func (p *fediAPI) UpdateStatus(ctx context.Context, fMsg *messages.FromFediAPI)
return gtserror.Newf("cannot cast %T -> *gtsmodel.Status", fMsg.GTSModel)
}
+ var freshness *dereferencing.FreshnessWindow
+
// Cast the updated ActivityPub statusable object .
apStatus, _ := fMsg.APObject.(ap.Statusable)
+ if apStatus != nil {
+ // If an AP object was provided, we
+ // allow very fast refreshes that likely
+ // indicate a status edit after post.
+ freshness = dereferencing.Freshest
+ }
+
// Fetch up-to-date attach status attachments, etc.
status, _, err := p.federate.RefreshStatus(
ctx,
fMsg.Receiving.Username,
existing,
apStatus,
- // Force refresh within 5min window.
- dereferencing.Fresh,
+ freshness,
)
if err != nil {
log.Errorf(ctx, "error refreshing status: %v", err)