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

This commit is contained in:
Daniel M Brasil 2024-06-10 10:33:48 -03:00 committed by GitHub
parent 0cf91213c9
commit 77c2216e47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 1 deletions

View file

@ -171,7 +171,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!