fix: Return HTTP 422 when scheduled status time is less than 5 minutes (#30584)

This commit is contained in:
Claire
2024-07-03 09:15:47 +02:00
parent 6cf83a2a64
commit 4b45333aff
3 changed files with 51 additions and 1 deletions

View File

@@ -148,7 +148,7 @@ class PostStatusService < BaseService
end
def scheduled_in_the_past?
@scheduled_at.present? && @scheduled_at <= Time.now.utc + MIN_SCHEDULE_OFFSET
@scheduled_at.present? && @scheduled_at <= Time.now.utc
end
def bump_potential_friendship!