1
0
Fork 0
forked from gitea/nas

Add delay to profile updates to debounce them (#34137)

This commit is contained in:
Claire 2025-03-28 16:30:28 +01:00
parent d9fb61f305
commit 6d53e8c6c5
12 changed files with 22 additions and 24 deletions

View file

@ -9,7 +9,7 @@ class Settings::ProfilesController < Settings::BaseController
def update
if UpdateAccountService.new.call(@account, account_params)
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
ActivityPub::UpdateDistributionWorker.perform_in(ActivityPub::UpdateDistributionWorker::DEBOUNCE_DELAY, @account.id)
redirect_to settings_profile_path, notice: I18n.t('generic.changes_saved_msg')
else
@account.build_fields