Skip to content
Snippets Groups Projects
Unverified Commit 4552449c authored by ThibG's avatar ThibG Committed by GitHub
Browse files

Fix profile update not being sent on profile/header picture deletion (#15461)


Fixes #15460

Co-authored-by: default avatarClaire <claire.github-309c@sitedethib.com>
parent 3f4b0dfd
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,12 @@ module Settings
def destroy
if valid_picture?
msg = I18n.t('generic.changes_saved_msg') if UpdateAccountService.new.call(@account, { @picture => nil, "#{@picture}_remote_url" => '' })
redirect_to settings_profile_path, notice: msg, status: 303
if UpdateAccountService.new.call(@account, { @picture => nil, "#{@picture}_remote_url" => '' })
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
redirect_to settings_profile_path, notice: I18n.t('generic.changes_saved_msg'), status: 303
else
redirect_to settings_profile_path
end
else
bad_request
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment