0
0
Fork 0

Add ability to manage which websites can credit you in link previews (#31819)

This commit is contained in:
Eugen Rochko 2024-09-10 14:00:40 +02:00 committed by GitHub
parent 3929e3c6d2
commit e0c27a5047
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
92 changed files with 381 additions and 160 deletions

View file

@ -2,14 +2,30 @@
class Settings::VerificationsController < Settings::BaseController
before_action :set_account
before_action :set_verified_links
def show
@verified_links = @account.fields.select(&:verified?)
def show; end
def update
if UpdateAccountService.new.call(@account, account_params)
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
redirect_to settings_verification_path, notice: I18n.t('generic.changes_saved_msg')
else
render :show
end
end
private
def account_params
params.require(:account).permit(:attribution_domains_as_text)
end
def set_account
@account = current_account
end
def set_verified_links
@verified_links = @account.fields.select(&:verified?)
end
end