Add rate limit for editing (#17728)

This commit is contained in:
Eugen Rochko
2022-03-09 20:06:51 +01:00
committed by GitHub
parent 803f536cdd
commit b2cd34474b
5 changed files with 11 additions and 5 deletions

View File

@ -216,13 +216,13 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
return if @status.edits.any?
@status.snapshot!(at_time: @status.created_at)
@status.snapshot!(at_time: @status.created_at, rate_limit: false)
end
def create_edit!
return unless significant_changes?
@status.snapshot!(account_id: @account.id)
@status.snapshot!(account_id: @account.id, rate_limit: false)
end
def skip_download?

View File

@ -131,7 +131,7 @@ class UpdateStatusService < BaseService
return if @status.edits.any?
@status.snapshot!(at_time: @status.created_at)
@status.snapshot!(at_time: @status.created_at, rate_limit: false)
end
def create_edit!