Add result_count to Mastodon-Async-Refresh header when needed (#36239)

This commit is contained in:
Claire authored and GitHub committed 2025-10-10 12:26:10 +00:00
1 parent 3f2ee09827
commit 0219b7cad7
1 file changed
+4 -1
@@ -6,6 +6,9 @@ module AsyncRefreshesConcern
def add_async_refresh_header(async_refresh, retry_seconds: 3)
return unless async_refresh.running?
response.headers['Mastodon-Async-Refresh'] = "id=\"#{async_refresh.id}\", retry=#{retry_seconds}"
value = "id=\"#{async_refresh.id}\", retry=#{retry_seconds}"
value += ", result_count=#{async_refresh.result_count}" unless async_refresh.result_count.nil?
response.headers['Mastodon-Async-Refresh'] = value
end
end