about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-01-03 00:38:20 +0100
committerGitHub <noreply@github.com>2018-01-03 00:38:20 +0100
commitd319b3dbe4cf40bfca12a224adb54a8fb6033090 (patch)
tree3dbfaf4db1ddc6e0a7c9c75857ec839f6c0d85b0
parentd60fd87e0191ad05d8dd7f2e8d7d265db6f168d3 (diff)
Update moved-to property when it's removed too (#6160)
* Fix #6140 - Update moved-to property when it's removed too

* Remove trailing whitespace
-rw-r--r--app/services/activitypub/process_account_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb
index 06ca75563..0fbf18c00 100644
--- a/app/services/activitypub/process_account_service.rb
+++ b/app/services/activitypub/process_account_service.rb
@@ -74,7 +74,7 @@ class ActivityPub::ProcessAccountService < BaseService
     @account.statuses_count    = outbox_total_items    if outbox_total_items.present?
     @account.following_count   = following_total_items if following_total_items.present?
     @account.followers_count   = followers_total_items if followers_total_items.present?
-    @account.moved_to_account  = moved_account         if @json['movedTo'].present?
+    @account.moved_to_account  = @json['movedTo'].present? ? moved_account : nil
   end
 
   def after_protocol_change!