mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-29 08:16:58 +00:00
Fix profile update not being sent on profile/header picture deletion (#15461)
Fixes #15460 Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
4063bbe04e
commit
6386421d1a
|
@ -7,8 +7,12 @@ module Settings
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if valid_picture?
|
if valid_picture?
|
||||||
msg = I18n.t('generic.changes_saved_msg') if UpdateAccountService.new.call(@account, { @picture => nil, "#{@picture}_remote_url" => '' })
|
if UpdateAccountService.new.call(@account, { @picture => nil, "#{@picture}_remote_url" => '' })
|
||||||
redirect_to settings_profile_path, notice: msg, status: 303
|
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
|
else
|
||||||
bad_request
|
bad_request
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue