]> cat aescling's git repositories - mastodon.git/commitdiff
Update moved-to property when it's removed too (#6160)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 2 Jan 2018 23:38:20 +0000 (00:38 +0100)
committerGitHub <noreply@github.com>
Tue, 2 Jan 2018 23:38:20 +0000 (00:38 +0100)
* Fix #6140 - Update moved-to property when it's removed too

* Remove trailing whitespace

app/services/activitypub/process_account_service.rb

index 06ca755636806a88dc41911fbdc8204cce984089..0fbf18c0018578d84a0dc7aec01a09f0e36a6ab0 100644 (file)
@@ -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!