{"action":"created","comment":{"url":"https://api.github.com/repos/zulip/zulip/pulls/comments/90771642","pull_request_review_id":11289399,"id":90771642,"diff_hunk":"@@ -391,3 +393,24 @@ def consume(self, event):\n         logging.info(\"TestWorker should append this message to %s: %s\" % (fn, message))\n         with open(fn, 'a') as f:\n             f.write(message + '\\n')\n+\n+@assign_queue('embed_links')\n+class FetchLinksEmbedData(QueueProcessingWorker):\n+    def consume(self, event):\n+        # type: (Mapping[str, Any]) -> None\n+        for url in event['urls']:\n+            url_preview.get_link_embed_data(url)\n+\n+        message = Message.objects.get(id=event['message_id'])\n+        if message.content != event['message_content']:","path":"zerver/worker/queue_processors.py","position":33,"original_position":33,"commit_id":"03bed1fb4f0f76cc20b80e48d599e58e97489220","original_commit_id":"03bed1fb4f0f76cc20b80e48d599e58e97489220","user":{"login":"timabbott","id":2746074,"avatar_url":"https://avatars.githubusercontent.com/u/2746074?v=3","gravatar_id":"","url":"https://api.github.com/users/timabbott","html_url":"https://github.com/timabbott","followers_url":"https://api.github.com/users/timabbott/followers","following_url":"https://api.github.com/users/timabbott/following{/other_user}","gists_url":"https://api.github.com/users/timabbott/gists{/gist_id}","starred_url":"https://api.github.com/users/timabbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timabbott/subscriptions","organizations_url":"https://api.github.com/users/timabbott/orgs","repos_url":"https://api.github.com/users/timabbott/repos","events_url":"https://api.github.com/users/timabbott/events{/privacy}","received_events_url":"https://api.github.com/users/timabbott/received_events","type":"User","site_admin":false},"body":"Add a comment here explaining that this check is here to handle message edits.\r\n\r\nIdeally, we'd also have a test verifying the message edit logic.","created_at":"2016-12-04T06:34:42Z","updated_at":"2016-12-04T07:01:32Z","html_url":"https://github.com/zulip/zulip/pull/2133#discussion_r90771642","pull_request_url":"https://api.github.com/repos/zulip/zulip/pulls/2133","_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip/pulls/comments/90771642"},"html":{"href":"https://github.com/zulip/zulip/pull/2133#discussion_r90771642"},"pull_request":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2133"}}},"pull_request":{"url":"https://api.github.com/repos/zulip/zulip/pulls/2133","id":91032205,"html_url":"https://github.com/zulip/zulip/pull/2133","diff_url":"https://github.com/zulip/zulip/pull/2133.diff","patch_url":"https://github.com/zulip/zulip/pull/2133.patch","issue_url":"https://api.github.com/repos/zulip/zulip/issues/2133","number":2133,"state":"open","locked":false,"title":"Inline URL preview","user":{"login":"TigorC","id":1096253,"avatar_url":"https://avatars.githubusercontent.com/u/1096253?v=3","gravatar_id":"","url":"https://api.github.com/users/TigorC","html_url":"https://github.com/TigorC","followers_url":"https://api.github.com/users/TigorC/followers","following_url":"https://api.github.com/users/TigorC/following{/other_user}","gists_url":"https://api.github.com/users/TigorC/gists{/gist_id}","starred_url":"https://api.github.com/users/TigorC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TigorC/subscriptions","organizations_url":"https://api.github.com/users/TigorC/orgs","repos_url":"https://api.github.com/users/TigorC/repos","events_url":"https://api.github.com/users/TigorC/events{/privacy}","received_events_url":"https://api.github.com/users/TigorC/received_events","type":"User","site_admin":false},"body":"The following things are implemented in this pull request:\n1. Getting data for links using 3 sources: oEmbed, Open Graph, meta tags. (In that order).\n2. Getting data asynchronously.\n3. Caching link data\n\nThese things are not implemented/taken care of yet:\n1. Race condition: user can try to edit a message before the data links are obtained.\n2. Design for links preview on client side.\nIssue: #406 \n","created_at":"2016-10-26T15:45:28Z","updated_at":"2016-12-04T07:01:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fdae4596d46ed01c02b00f373c3abee23b343a7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zulip/zulip/pulls/2133/commits","review_comments_url":"https://api.github.com/repos/zulip/zulip/pulls/2133/comments","review_comment_url":"https://api.github.com/repos/zulip/zulip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/2133/comments","statuses_url":"https://api.github.com/repos/zulip/zulip/statuses/03bed1fb4f0f76cc20b80e48d599e58e97489220","head":{"label":"TigorC:url_embed","ref":"url_embed","sha":"03bed1fb4f0f76cc20b80e48d599e58e97489220","user":{"login":"TigorC","id":1096253,"avatar_url":"https://avatars.githubusercontent.com/u/1096253?v=3","gravatar_id":"","url":"https://api.github.com/users/TigorC","html_url":"https://github.com/TigorC","followers_url":"https://api.github.com/users/TigorC/followers","following_url":"https://api.github.com/users/TigorC/following{/other_user}","gists_url":"https://api.github.com/users/TigorC/gists{/gist_id}","starred_url":"https://api.github.com/users/TigorC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TigorC/subscriptions","organizations_url":"https://api.github.com/users/TigorC/orgs","repos_url":"https://api.github.com/users/TigorC/repos","events_url":"https://api.github.com/users/TigorC/events{/privacy}","received_events_url":"https://api.github.com/users/TigorC/received_events","type":"User","site_admin":false},"repo":{"id":71198576,"name":"zulip","full_name":"TigorC/zulip","owner":{"login":"TigorC","id":1096253,"avatar_url":"https://avatars.githubusercontent.com/u/1096253?v=3","gravatar_id":"","url":"https://api.github.com/users/TigorC","html_url":"https://github.com/TigorC","followers_url":"https://api.github.com/users/TigorC/followers","following_url":"https://api.github.com/users/TigorC/following{/other_user}","gists_url":"https://api.github.com/users/TigorC/gists{/gist_id}","starred_url":"https://api.github.com/users/TigorC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TigorC/subscriptions","organizations_url":"https://api.github.com/users/TigorC/orgs","repos_url":"https://api.github.com/users/TigorC/repos","events_url":"https://api.github.com/users/TigorC/events{/privacy}","received_events_url":"https://api.github.com/users/TigorC/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TigorC/zulip","description":"Zulip server - powerful open source group chat","fork":true,"url":"https://api.github.com/repos/TigorC/zulip","forks_url":"https://api.github.com/repos/TigorC/zulip/forks","keys_url":"https://api.github.com/repos/TigorC/zulip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TigorC/zulip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TigorC/zulip/teams","hooks_url":"https://api.github.com/repos/TigorC/zulip/hooks","issue_events_url":"https://api.github.com/repos/TigorC/zulip/issues/events{/number}","events_url":"https://api.github.com/repos/TigorC/zulip/events","assignees_url":"https://api.github.com/repos/TigorC/zulip/assignees{/user}","branches_url":"https://api.github.com/repos/TigorC/zulip/branches{/branch}","tags_url":"https://api.github.com/repos/TigorC/zulip/tags","blobs_url":"https://api.github.com/repos/TigorC/zulip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TigorC/zulip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TigorC/zulip/git/refs{/sha}","trees_url":"https://api.github.com/repos/TigorC/zulip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TigorC/zulip/statuses/{sha}","languages_url":"https://api.github.com/repos/TigorC/zulip/languages","stargazers_url":"https://api.github.com/repos/TigorC/zulip/stargazers","contributors_url":"https://api.github.com/repos/TigorC/zulip/contributors","subscribers_url":"https://api.github.com/repos/TigorC/zulip/subscribers","subscription_url":"https://api.github.com/repos/TigorC/zulip/subscription","commits_url":"https://api.github.com/repos/TigorC/zulip/commits{/sha}","git_commits_url":"https://api.github.com/repos/TigorC/zulip/git/commits{/sha}","comments_url":"https://api.github.com/repos/TigorC/zulip/comments{/number}","issue_comment_url":"https://api.github.com/repos/TigorC/zulip/issues/comments{/number}","contents_url":"https://api.github.com/repos/TigorC/zulip/contents/{+path}","compare_url":"https://api.github.com/repos/TigorC/zulip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TigorC/zulip/merges","archive_url":"https://api.github.com/repos/TigorC/zulip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TigorC/zulip/downloads","issues_url":"https://api.github.com/repos/TigorC/zulip/issues{/number}","pulls_url":"https://api.github.com/repos/TigorC/zulip/pulls{/number}","milestones_url":"https://api.github.com/repos/TigorC/zulip/milestones{/number}","notifications_url":"https://api.github.com/repos/TigorC/zulip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TigorC/zulip/labels{/name}","releases_url":"https://api.github.com/repos/TigorC/zulip/releases{/id}","deployments_url":"https://api.github.com/repos/TigorC/zulip/deployments","created_at":"2016-10-18T01:58:06Z","updated_at":"2016-10-18T01:58:15Z","pushed_at":"2016-12-03T13:56:26Z","git_url":"git://github.com/TigorC/zulip.git","ssh_url":"git@github.com:TigorC/zulip.git","clone_url":"https://github.com/TigorC/zulip.git","svn_url":"https://github.com/TigorC/zulip","homepage":"","size":120713,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"zulip:master","ref":"master","sha":"7fd15984fc0feec06011cc0ac4fa25ee1b520542","user":{"login":"zulip","id":4921959,"avatar_url":"https://avatars.githubusercontent.com/u/4921959?v=3","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"repo":{"id":43160685,"name":"zulip","full_name":"zulip/zulip","owner":{"login":"zulip","id":4921959,"avatar_url":"https://avatars.githubusercontent.com/u/4921959?v=3","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zulip/zulip","description":"Zulip server - powerful open source group chat","fork":false,"url":"https://api.github.com/repos/zulip/zulip","forks_url":"https://api.github.com/repos/zulip/zulip/forks","keys_url":"https://api.github.com/repos/zulip/zulip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zulip/zulip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zulip/zulip/teams","hooks_url":"https://api.github.com/repos/zulip/zulip/hooks","issue_events_url":"https://api.github.com/repos/zulip/zulip/issues/events{/number}","events_url":"https://api.github.com/repos/zulip/zulip/events","assignees_url":"https://api.github.com/repos/zulip/zulip/assignees{/user}","branches_url":"https://api.github.com/repos/zulip/zulip/branches{/branch}","tags_url":"https://api.github.com/repos/zulip/zulip/tags","blobs_url":"https://api.github.com/repos/zulip/zulip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zulip/zulip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zulip/zulip/git/refs{/sha}","trees_url":"https://api.github.com/repos/zulip/zulip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zulip/zulip/statuses/{sha}","languages_url":"https://api.github.com/repos/zulip/zulip/languages","stargazers_url":"https://api.github.com/repos/zulip/zulip/stargazers","contributors_url":"https://api.github.com/repos/zulip/zulip/contributors","subscribers_url":"https://api.github.com/repos/zulip/zulip/subscribers","subscription_url":"https://api.github.com/repos/zulip/zulip/subscription","commits_url":"https://api.github.com/repos/zulip/zulip/commits{/sha}","git_commits_url":"https://api.github.com/repos/zulip/zulip/git/commits{/sha}","comments_url":"https://api.github.com/repos/zulip/zulip/comments{/number}","issue_comment_url":"https://api.github.com/repos/zulip/zulip/issues/comments{/number}","contents_url":"https://api.github.com/repos/zulip/zulip/contents/{+path}","compare_url":"https://api.github.com/repos/zulip/zulip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zulip/zulip/merges","archive_url":"https://api.github.com/repos/zulip/zulip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zulip/zulip/downloads","issues_url":"https://api.github.com/repos/zulip/zulip/issues{/number}","pulls_url":"https://api.github.com/repos/zulip/zulip/pulls{/number}","milestones_url":"https://api.github.com/repos/zulip/zulip/milestones{/number}","notifications_url":"https://api.github.com/repos/zulip/zulip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zulip/zulip/labels{/name}","releases_url":"https://api.github.com/repos/zulip/zulip/releases{/id}","deployments_url":"https://api.github.com/repos/zulip/zulip/deployments","created_at":"2015-09-25T16:37:25Z","updated_at":"2016-12-03T20:28:12Z","pushed_at":"2016-12-04T06:48:39Z","git_url":"git://github.com/zulip/zulip.git","ssh_url":"git@github.com:zulip/zulip.git","clone_url":"https://github.com/zulip/zulip.git","svn_url":"https://github.com/zulip/zulip","homepage":"","size":133099,"stargazers_count":4318,"watchers_count":4318,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":874,"mirror_url":null,"open_issues_count":608,"forks":874,"open_issues":608,"watchers":4318,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2133"},"html":{"href":"https://github.com/zulip/zulip/pull/2133"},"issue":{"href":"https://api.github.com/repos/zulip/zulip/issues/2133"},"comments":{"href":"https://api.github.com/repos/zulip/zulip/issues/2133/comments"},"review_comments":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2133/comments"},"review_comment":{"href":"https://api.github.com/repos/zulip/zulip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2133/commits"},"statuses":{"href":"https://api.github.com/repos/zulip/zulip/statuses/03bed1fb4f0f76cc20b80e48d599e58e97489220"}}}}
{"actor":{"display_login":"timabbott"}}