diff options
author | ThibG <thib@sitedethib.com> | 2021-01-06 22:03:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 22:03:23 +0100 |
commit | d42e7e01dcd464f80637682d4eee6e5a7f36f26e (patch) | |
tree | 3a594f4d232cad40fa268d66539498db2ea217e2 /app/controllers/settings | |
parent | 225c934a1b66e2fcbedbda7936666c1ca3c9a04b (diff) | |
parent | 55e84f9125608f12a7d29ec9bf9240e9a48cf4e5 (diff) |
Merge pull request #1482 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/settings')
-rw-r--r-- | app/controllers/settings/pictures_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/settings/pictures_controller.rb b/app/controllers/settings/pictures_controller.rb index 28df65f8f..58a432530 100644 --- a/app/controllers/settings/pictures_controller.rb +++ b/app/controllers/settings/pictures_controller.rb @@ -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 |