From 8968d3a4104b028c1b39e1bbaab11a63f85e95f7 Mon Sep 17 00:00:00 2001 From: David Roetzel Date: Thu, 10 Apr 2025 15:03:09 +0200 Subject: [PATCH] Improve comment to explain redundant call --- app/models/concerns/status/fasp_concern.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/concerns/status/fasp_concern.rb b/app/models/concerns/status/fasp_concern.rb index d09dd3ca10..5e7cf45379 100644 --- a/app/models/concerns/status/fasp_concern.rb +++ b/app/models/concerns/status/fasp_concern.rb @@ -16,7 +16,11 @@ module Status::FaspConcern return unless Mastodon::Feature.fasp_enabled? return unless account_indexable? && public_visibility? - store_uri unless uri # TODO: solve this more elegantly + # We need the uri here, but it is set in another `after_commit` + # callback. Hooks included from modules are run before the ones + # in the class itself and can neither be reordered nor is there + # a way to declare dependencies. + store_uri if uri.nil? Fasp::AnnounceContentLifecycleEventWorker.perform_async(uri, 'new') end