diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-03-09 20:06:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 20:06:51 +0100 |
commit | b2cd34474b58b8a1f5e01ba73d236551dd0a878f (patch) | |
tree | 53e6abc10bd98ebd99d33ae51b67940734bd99fe /app/services | |
parent | 803f536cdd2e378146372976b64896a656ceec5b (diff) |
Add rate limit for editing (#17728)
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/activitypub/process_status_update_service.rb | 4 | ||||
-rw-r--r-- | app/services/update_status_service.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/services/activitypub/process_status_update_service.rb b/app/services/activitypub/process_status_update_service.rb index 11afa894f..1260c0482 100644 --- a/app/services/activitypub/process_status_update_service.rb +++ b/app/services/activitypub/process_status_update_service.rb @@ -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? diff --git a/app/services/update_status_service.rb b/app/services/update_status_service.rb index 1c63ab656..055e5968d 100644 --- a/app/services/update_status_service.rb +++ b/app/services/update_status_service.rb @@ -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! |