{"action":"created","comment":{"url":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments/110989506","pull_request_review_id":32201102,"id":110989506,"diff_hunk":"@@ -16,7 +16,7 @@ def call(uri)\n     return Account.find_local(username) if TagManager.instance.local_domain?(domain)\n \n     account = Account.find_remote(username, domain)\n-    return account unless account.nil?\n+    return account unless account&.last_webfingered_at.nil? || account.last_webfingered_at + 86_400 < Time.now.utc","path":"app/services/follow_remote_account_service.rb","position":5,"original_position":5,"commit_id":"b5602d095992ae87b9af7f6b9017f9133aee66e9","original_commit_id":"b5602d095992ae87b9af7f6b9017f9133aee66e9","user":{"login":"ThibG","id":384364,"avatar_url":"https://avatars1.githubusercontent.com/u/384364?v=3","gravatar_id":"","url":"https://api.github.com/users/ThibG","html_url":"https://github.com/ThibG","followers_url":"https://api.github.com/users/ThibG/followers","following_url":"https://api.github.com/users/ThibG/following{/other_user}","gists_url":"https://api.github.com/users/ThibG/gists{/gist_id}","starred_url":"https://api.github.com/users/ThibG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThibG/subscriptions","organizations_url":"https://api.github.com/users/ThibG/orgs","repos_url":"https://api.github.com/users/ThibG/repos","events_url":"https://api.github.com/users/ThibG/events{/privacy}","received_events_url":"https://api.github.com/users/ThibG/received_events","type":"User","site_admin":false},"body":"I'll trust RoR to do the right thing on this, and use your suggested 1.day.from_now :)","created_at":"2017-04-11T19:13:19Z","updated_at":"2017-04-11T19:13:19Z","html_url":"https://github.com/tootsuite/mastodon/pull/1323#discussion_r110989506","pull_request_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323","_links":{"self":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments/110989506"},"html":{"href":"https://github.com/tootsuite/mastodon/pull/1323#discussion_r110989506"},"pull_request":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323"}}},"pull_request":{"url":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323","id":114977507,"html_url":"https://github.com/tootsuite/mastodon/pull/1323","diff_url":"https://github.com/tootsuite/mastodon/pull/1323.diff","patch_url":"https://github.com/tootsuite/mastodon/pull/1323.patch","issue_url":"https://api.github.com/repos/tootsuite/mastodon/issues/1323","number":1323,"state":"open","locked":false,"title":"Refresh webfinger","user":{"login":"ThibG","id":384364,"avatar_url":"https://avatars1.githubusercontent.com/u/384364?v=3","gravatar_id":"","url":"https://api.github.com/users/ThibG","html_url":"https://github.com/ThibG","followers_url":"https://api.github.com/users/ThibG/followers","following_url":"https://api.github.com/users/ThibG/following{/other_user}","gists_url":"https://api.github.com/users/ThibG/gists{/gist_id}","starred_url":"https://api.github.com/users/ThibG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThibG/subscriptions","organizations_url":"https://api.github.com/users/ThibG/orgs","repos_url":"https://api.github.com/users/ThibG/repos","events_url":"https://api.github.com/users/ThibG/events{/privacy}","received_events_url":"https://api.github.com/users/ThibG/received_events","type":"User","site_admin":false},"body":"This is an attempt to fix #1276 that I've been running on my instance without any ill effect (that I noticed),\r\nbut I couldn't verify that it fixes my particular issue, as the instances having incorrect information about my account are remote ones on which I could not try those changes.\r\n\r\nThis is split in two commits:\r\n* The first one allows to refresh some existing account if webfinger returns new information. This only performs additional requests if one of the URLs or the public key did actually change. This is essentially dead code in the absence of the second patch, as local information on the remote account will be returned if it exists, without querying webfinger.\r\n* The second patch performs the webfinger query whenever we are looking up at a remote account we are not subscribed to. The rationale is that the most important aspect of a remote account is the ability to be subscribed to, and if that fails, the account info may need updating. On the other hand, we may miss things like the user's web-facing profile URL changing. Furthermore, it may generate additional unwanted requests, and may probably be restricted to remote users we tried to subscribe to but failed.\r\n\r\nAs evidenced by the second patch, I am not too sure *when* we should re-query webfinger, any input on this would be appreciated.","created_at":"2017-04-09T08:15:42Z","updated_at":"2017-04-11T19:13:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9841ed8ec1e98ae07a2b529253d0cd83e639dd94","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323/commits","review_comments_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323/comments","review_comment_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tootsuite/mastodon/issues/1323/comments","statuses_url":"https://api.github.com/repos/tootsuite/mastodon/statuses/b5602d095992ae87b9af7f6b9017f9133aee66e9","head":{"label":"ThibG:refresh-webfinger","ref":"refresh-webfinger","sha":"b5602d095992ae87b9af7f6b9017f9133aee66e9","user":{"login":"ThibG","id":384364,"avatar_url":"https://avatars1.githubusercontent.com/u/384364?v=3","gravatar_id":"","url":"https://api.github.com/users/ThibG","html_url":"https://github.com/ThibG","followers_url":"https://api.github.com/users/ThibG/followers","following_url":"https://api.github.com/users/ThibG/following{/other_user}","gists_url":"https://api.github.com/users/ThibG/gists{/gist_id}","starred_url":"https://api.github.com/users/ThibG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThibG/subscriptions","organizations_url":"https://api.github.com/users/ThibG/orgs","repos_url":"https://api.github.com/users/ThibG/repos","events_url":"https://api.github.com/users/ThibG/events{/privacy}","received_events_url":"https://api.github.com/users/ThibG/received_events","type":"User","site_admin":false},"repo":{"id":87636240,"name":"mastodon","full_name":"ThibG/mastodon","owner":{"login":"ThibG","id":384364,"avatar_url":"https://avatars1.githubusercontent.com/u/384364?v=3","gravatar_id":"","url":"https://api.github.com/users/ThibG","html_url":"https://github.com/ThibG","followers_url":"https://api.github.com/users/ThibG/followers","following_url":"https://api.github.com/users/ThibG/following{/other_user}","gists_url":"https://api.github.com/users/ThibG/gists{/gist_id}","starred_url":"https://api.github.com/users/ThibG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThibG/subscriptions","organizations_url":"https://api.github.com/users/ThibG/orgs","repos_url":"https://api.github.com/users/ThibG/repos","events_url":"https://api.github.com/users/ThibG/events{/privacy}","received_events_url":"https://api.github.com/users/ThibG/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThibG/mastodon","description":"A GNU Social-compatible microblogging server","fork":true,"url":"https://api.github.com/repos/ThibG/mastodon","forks_url":"https://api.github.com/repos/ThibG/mastodon/forks","keys_url":"https://api.github.com/repos/ThibG/mastodon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThibG/mastodon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThibG/mastodon/teams","hooks_url":"https://api.github.com/repos/ThibG/mastodon/hooks","issue_events_url":"https://api.github.com/repos/ThibG/mastodon/issues/events{/number}","events_url":"https://api.github.com/repos/ThibG/mastodon/events","assignees_url":"https://api.github.com/repos/ThibG/mastodon/assignees{/user}","branches_url":"https://api.github.com/repos/ThibG/mastodon/branches{/branch}","tags_url":"https://api.github.com/repos/ThibG/mastodon/tags","blobs_url":"https://api.github.com/repos/ThibG/mastodon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThibG/mastodon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThibG/mastodon/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThibG/mastodon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThibG/mastodon/statuses/{sha}","languages_url":"https://api.github.com/repos/ThibG/mastodon/languages","stargazers_url":"https://api.github.com/repos/ThibG/mastodon/stargazers","contributors_url":"https://api.github.com/repos/ThibG/mastodon/contributors","subscribers_url":"https://api.github.com/repos/ThibG/mastodon/subscribers","subscription_url":"https://api.github.com/repos/ThibG/mastodon/subscription","commits_url":"https://api.github.com/repos/ThibG/mastodon/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThibG/mastodon/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThibG/mastodon/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThibG/mastodon/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThibG/mastodon/contents/{+path}","compare_url":"https://api.github.com/repos/ThibG/mastodon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThibG/mastodon/merges","archive_url":"https://api.github.com/repos/ThibG/mastodon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThibG/mastodon/downloads","issues_url":"https://api.github.com/repos/ThibG/mastodon/issues{/number}","pulls_url":"https://api.github.com/repos/ThibG/mastodon/pulls{/number}","milestones_url":"https://api.github.com/repos/ThibG/mastodon/milestones{/number}","notifications_url":"https://api.github.com/repos/ThibG/mastodon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThibG/mastodon/labels{/name}","releases_url":"https://api.github.com/repos/ThibG/mastodon/releases{/id}","deployments_url":"https://api.github.com/repos/ThibG/mastodon/deployments","created_at":"2017-04-08T13:36:20Z","updated_at":"2017-04-08T13:36:25Z","pushed_at":"2017-04-11T17:35:36Z","git_url":"git://github.com/ThibG/mastodon.git","ssh_url":"git@github.com:ThibG/mastodon.git","clone_url":"https://github.com/ThibG/mastodon.git","svn_url":"https://github.com/ThibG/mastodon","homepage":"https://mastodon.social","size":34218,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tootsuite:master","ref":"master","sha":"82d93361148515951a6c6ca5996c0214098eabe4","user":{"login":"tootsuite","id":24979032,"avatar_url":"https://avatars0.githubusercontent.com/u/24979032?v=3","gravatar_id":"","url":"https://api.github.com/users/tootsuite","html_url":"https://github.com/tootsuite","followers_url":"https://api.github.com/users/tootsuite/followers","following_url":"https://api.github.com/users/tootsuite/following{/other_user}","gists_url":"https://api.github.com/users/tootsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/tootsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tootsuite/subscriptions","organizations_url":"https://api.github.com/users/tootsuite/orgs","repos_url":"https://api.github.com/users/tootsuite/repos","events_url":"https://api.github.com/users/tootsuite/events{/privacy}","received_events_url":"https://api.github.com/users/tootsuite/received_events","type":"Organization","site_admin":false},"repo":{"id":52281283,"name":"mastodon","full_name":"tootsuite/mastodon","owner":{"login":"tootsuite","id":24979032,"avatar_url":"https://avatars0.githubusercontent.com/u/24979032?v=3","gravatar_id":"","url":"https://api.github.com/users/tootsuite","html_url":"https://github.com/tootsuite","followers_url":"https://api.github.com/users/tootsuite/followers","following_url":"https://api.github.com/users/tootsuite/following{/other_user}","gists_url":"https://api.github.com/users/tootsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/tootsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tootsuite/subscriptions","organizations_url":"https://api.github.com/users/tootsuite/orgs","repos_url":"https://api.github.com/users/tootsuite/repos","events_url":"https://api.github.com/users/tootsuite/events{/privacy}","received_events_url":"https://api.github.com/users/tootsuite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tootsuite/mastodon","description":"A GNU Social-compatible microblogging server","fork":false,"url":"https://api.github.com/repos/tootsuite/mastodon","forks_url":"https://api.github.com/repos/tootsuite/mastodon/forks","keys_url":"https://api.github.com/repos/tootsuite/mastodon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tootsuite/mastodon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tootsuite/mastodon/teams","hooks_url":"https://api.github.com/repos/tootsuite/mastodon/hooks","issue_events_url":"https://api.github.com/repos/tootsuite/mastodon/issues/events{/number}","events_url":"https://api.github.com/repos/tootsuite/mastodon/events","assignees_url":"https://api.github.com/repos/tootsuite/mastodon/assignees{/user}","branches_url":"https://api.github.com/repos/tootsuite/mastodon/branches{/branch}","tags_url":"https://api.github.com/repos/tootsuite/mastodon/tags","blobs_url":"https://api.github.com/repos/tootsuite/mastodon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tootsuite/mastodon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tootsuite/mastodon/git/refs{/sha}","trees_url":"https://api.github.com/repos/tootsuite/mastodon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tootsuite/mastodon/statuses/{sha}","languages_url":"https://api.github.com/repos/tootsuite/mastodon/languages","stargazers_url":"https://api.github.com/repos/tootsuite/mastodon/stargazers","contributors_url":"https://api.github.com/repos/tootsuite/mastodon/contributors","subscribers_url":"https://api.github.com/repos/tootsuite/mastodon/subscribers","subscription_url":"https://api.github.com/repos/tootsuite/mastodon/subscription","commits_url":"https://api.github.com/repos/tootsuite/mastodon/commits{/sha}","git_commits_url":"https://api.github.com/repos/tootsuite/mastodon/git/commits{/sha}","comments_url":"https://api.github.com/repos/tootsuite/mastodon/comments{/number}","issue_comment_url":"https://api.github.com/repos/tootsuite/mastodon/issues/comments{/number}","contents_url":"https://api.github.com/repos/tootsuite/mastodon/contents/{+path}","compare_url":"https://api.github.com/repos/tootsuite/mastodon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tootsuite/mastodon/merges","archive_url":"https://api.github.com/repos/tootsuite/mastodon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tootsuite/mastodon/downloads","issues_url":"https://api.github.com/repos/tootsuite/mastodon/issues{/number}","pulls_url":"https://api.github.com/repos/tootsuite/mastodon/pulls{/number}","milestones_url":"https://api.github.com/repos/tootsuite/mastodon/milestones{/number}","notifications_url":"https://api.github.com/repos/tootsuite/mastodon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tootsuite/mastodon/labels{/name}","releases_url":"https://api.github.com/repos/tootsuite/mastodon/releases{/id}","deployments_url":"https://api.github.com/repos/tootsuite/mastodon/deployments","created_at":"2016-02-22T15:01:25Z","updated_at":"2017-04-11T19:06:04Z","pushed_at":"2017-04-11T19:12:39Z","git_url":"git://github.com/tootsuite/mastodon.git","ssh_url":"git@github.com:tootsuite/mastodon.git","clone_url":"https://github.com/tootsuite/mastodon.git","svn_url":"https://github.com/tootsuite/mastodon","homepage":"https://mastodon.social","size":34510,"stargazers_count":5302,"watchers_count":5302,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":761,"mirror_url":null,"open_issues_count":536,"forks":761,"open_issues":536,"watchers":5302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323"},"html":{"href":"https://github.com/tootsuite/mastodon/pull/1323"},"issue":{"href":"https://api.github.com/repos/tootsuite/mastodon/issues/1323"},"comments":{"href":"https://api.github.com/repos/tootsuite/mastodon/issues/1323/comments"},"review_comments":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323/comments"},"review_comment":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/1323/commits"},"statuses":{"href":"https://api.github.com/repos/tootsuite/mastodon/statuses/b5602d095992ae87b9af7f6b9017f9133aee66e9"}}}}
{"actor":{"display_login":"ThibG"}}