]> cat aescling's git repositories - mastodon.git/commitdiff
#1141 on remote follow
authorYann GUERN <y.guern@rock-hosting.com>
Sat, 8 Apr 2017 01:24:35 +0000 (03:24 +0200)
committerGitHub <noreply@github.com>
Sat, 8 Apr 2017 01:24:35 +0000 (03:24 +0200)
The async action is send before persist, account.id not yet generated

Pull queue receive 'nil' so no profile update.

app/services/follow_remote_account_service.rb

index 936953429e7a2ac9de534a0a3b9166db53ae6b03..9ca7f653a49ca43b4e7a787219ab383db0186669 100644 (file)
@@ -51,8 +51,8 @@ class FollowRemoteAccountService < BaseService
     account.uri     = get_account_uri(xml)
     account.hub_url = hubs.first.attribute('href').value
 
-    get_profile(body, account)
     account.save!
+    get_profile(body, account)
 
     account
   end