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 9b6219c48f
commit 6cd9bd6ae1
3 changed files with 51 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!