Add result_count to Mastodon-Async-Refresh header when needed (#36239)
This commit is contained in:
@@ -6,6 +6,9 @@ module AsyncRefreshesConcern
|
|||||||
def add_async_refresh_header(async_refresh, retry_seconds: 3)
|
def add_async_refresh_header(async_refresh, retry_seconds: 3)
|
||||||
return unless async_refresh.running?
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user