2
0

Change “legacy” non-fast-tracked quote posts to not be displayed as such (#34945)

This commit is contained in:
Claire
2025-06-05 15:53:57 +02:00
committed by GitHub
parent 09208eafa4
commit 3d474807bf
7 changed files with 26 additions and 5 deletions

View File

@@ -7,6 +7,7 @@
# id :bigint(8) not null, primary key
# activity_uri :string
# approval_uri :string
# legacy :boolean default(FALSE), not null
# state :integer default("pending"), not null
# created_at :datetime not null
# updated_at :datetime not null
@@ -46,6 +47,10 @@ class Quote < ApplicationRecord
end
end
def acceptable?
accepted? || !legacy?
end
def schedule_refresh_if_stale!
return unless quoted_status_id.present? && approval_uri.present? && updated_at <= BACKGROUND_REFRESH_INTERVAL.ago