{"action":"created","comment":{"url":"https://api.github.com/repos/Newsi/talk/pulls/comments/190535733","pull_request_review_id":122929633,"id":190535733,"diff_hunk":"@@ -85,7 +85,9 @@ export class Talk {\n           window.location.origin = `${window.location.protocol}//${window.location.hostname}${window.location.port ? `:${window.location.port}` : ''}`;\n         }\n \n-        query.asset_url = window.location.origin + window.location.pathname;\n+        // check if this amp version. Need for setting correct asset_url\n+\n+        query.asset_url = (parent !== window) ? document.referrer : window.location.origin + window.location.pathname;","path":"client/coral-embed/src/index.js","position":7,"original_position":7,"commit_id":"6ebbfea5d3b86805162ff5f48df44e969fc58ef4","original_commit_id":"6ebbfea5d3b86805162ff5f48df44e969fc58ef4","user":{"login":"racc-oo-n","id":11316241,"avatar_url":"https://avatars3.githubusercontent.com/u/11316241?v=4","gravatar_id":"","url":"https://api.github.com/users/racc-oo-n","html_url":"https://github.com/racc-oo-n","followers_url":"https://api.github.com/users/racc-oo-n/followers","following_url":"https://api.github.com/users/racc-oo-n/following{/other_user}","gists_url":"https://api.github.com/users/racc-oo-n/gists{/gist_id}","starred_url":"https://api.github.com/users/racc-oo-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racc-oo-n/subscriptions","organizations_url":"https://api.github.com/users/racc-oo-n/orgs","repos_url":"https://api.github.com/users/racc-oo-n/repos","events_url":"https://api.github.com/users/racc-oo-n/events{/privacy}","received_events_url":"https://api.github.com/users/racc-oo-n/received_events","type":"User","site_admin":false},"body":"`document.referrer` всё таки не нужно использовать, потому что он может быть не нашим доменом, \r\n\r\nв amp мне кажется, надо как-то идти вверх, типа \r\n```\r\nquery.asset_url = parent !== window\r\n\t? document.parent.window.location.origin + document.parent.window.location.pathname\r\n\t: window.location.origin + window.location.pathname;\r\n```\r\n\r\nили \r\n```\r\nconst parent_window = parent !== window ? document.parent.window : window;\r\nquery.asset_url = parent_window.location.origin + parent_window.location.pathname;\r\n```","created_at":"2018-05-24T10:18:21Z","updated_at":"2018-05-24T10:19:49Z","html_url":"https://github.com/Newsi/talk/pull/53#discussion_r190535733","pull_request_url":"https://api.github.com/repos/Newsi/talk/pulls/53","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Newsi/talk/pulls/comments/190535733"},"html":{"href":"https://github.com/Newsi/talk/pull/53#discussion_r190535733"},"pull_request":{"href":"https://api.github.com/repos/Newsi/talk/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/Newsi/talk/pulls/53","id":190108712,"html_url":"https://github.com/Newsi/talk/pull/53","diff_url":"https://github.com/Newsi/talk/pull/53.diff","patch_url":"https://github.com/Newsi/talk/pull/53.patch","issue_url":"https://api.github.com/repos/Newsi/talk/issues/53","number":53,"state":"open","locked":false,"title":"Feature/amp support","user":{"login":"Ross146","id":12501480,"avatar_url":"https://avatars2.githubusercontent.com/u/12501480?v=4","gravatar_id":"","url":"https://api.github.com/users/Ross146","html_url":"https://github.com/Ross146","followers_url":"https://api.github.com/users/Ross146/followers","following_url":"https://api.github.com/users/Ross146/following{/other_user}","gists_url":"https://api.github.com/users/Ross146/gists{/gist_id}","starred_url":"https://api.github.com/users/Ross146/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ross146/subscriptions","organizations_url":"https://api.github.com/users/Ross146/orgs","repos_url":"https://api.github.com/users/Ross146/repos","events_url":"https://api.github.com/users/Ross146/events{/privacy}","received_events_url":"https://api.github.com/users/Ross146/received_events","type":"User","site_admin":false},"body":"еще добавлю необходимые метрики\r\n","created_at":"2018-05-23T21:21:34Z","updated_at":"2018-05-24T10:19:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c50b6e0c2c17f435def06f8611c0e6fa2c69295f","assignee":{"login":"Ross146","id":12501480,"avatar_url":"https://avatars2.githubusercontent.com/u/12501480?v=4","gravatar_id":"","url":"https://api.github.com/users/Ross146","html_url":"https://github.com/Ross146","followers_url":"https://api.github.com/users/Ross146/followers","following_url":"https://api.github.com/users/Ross146/following{/other_user}","gists_url":"https://api.github.com/users/Ross146/gists{/gist_id}","starred_url":"https://api.github.com/users/Ross146/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ross146/subscriptions","organizations_url":"https://api.github.com/users/Ross146/orgs","repos_url":"https://api.github.com/users/Ross146/repos","events_url":"https://api.github.com/users/Ross146/events{/privacy}","received_events_url":"https://api.github.com/users/Ross146/received_events","type":"User","site_admin":false},"assignees":[{"login":"Ross146","id":12501480,"avatar_url":"https://avatars2.githubusercontent.com/u/12501480?v=4","gravatar_id":"","url":"https://api.github.com/users/Ross146","html_url":"https://github.com/Ross146","followers_url":"https://api.github.com/users/Ross146/followers","following_url":"https://api.github.com/users/Ross146/following{/other_user}","gists_url":"https://api.github.com/users/Ross146/gists{/gist_id}","starred_url":"https://api.github.com/users/Ross146/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ross146/subscriptions","organizations_url":"https://api.github.com/users/Ross146/orgs","repos_url":"https://api.github.com/users/Ross146/repos","events_url":"https://api.github.com/users/Ross146/events{/privacy}","received_events_url":"https://api.github.com/users/Ross146/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Newsi/talk/pulls/53/commits","review_comments_url":"https://api.github.com/repos/Newsi/talk/pulls/53/comments","review_comment_url":"https://api.github.com/repos/Newsi/talk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Newsi/talk/issues/53/comments","statuses_url":"https://api.github.com/repos/Newsi/talk/statuses/6ebbfea5d3b86805162ff5f48df44e969fc58ef4","head":{"label":"Newsi:feature/amp-support","ref":"feature/amp-support","sha":"6ebbfea5d3b86805162ff5f48df44e969fc58ef4","user":{"login":"Newsi","id":15358153,"avatar_url":"https://avatars3.githubusercontent.com/u/15358153?v=4","gravatar_id":"","url":"https://api.github.com/users/Newsi","html_url":"https://github.com/Newsi","followers_url":"https://api.github.com/users/Newsi/followers","following_url":"https://api.github.com/users/Newsi/following{/other_user}","gists_url":"https://api.github.com/users/Newsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Newsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Newsi/subscriptions","organizations_url":"https://api.github.com/users/Newsi/orgs","repos_url":"https://api.github.com/users/Newsi/repos","events_url":"https://api.github.com/users/Newsi/events{/privacy}","received_events_url":"https://api.github.com/users/Newsi/received_events","type":"Organization","site_admin":false},"repo":{"id":110101517,"name":"talk","full_name":"Newsi/talk","owner":{"login":"Newsi","id":15358153,"avatar_url":"https://avatars3.githubusercontent.com/u/15358153?v=4","gravatar_id":"","url":"https://api.github.com/users/Newsi","html_url":"https://github.com/Newsi","followers_url":"https://api.github.com/users/Newsi/followers","following_url":"https://api.github.com/users/Newsi/following{/other_user}","gists_url":"https://api.github.com/users/Newsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Newsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Newsi/subscriptions","organizations_url":"https://api.github.com/users/Newsi/orgs","repos_url":"https://api.github.com/users/Newsi/repos","events_url":"https://api.github.com/users/Newsi/events{/privacy}","received_events_url":"https://api.github.com/users/Newsi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Newsi/talk","description":"A better commenting experience from Mozilla, The Washington Post, and The New York Times.","fork":true,"url":"https://api.github.com/repos/Newsi/talk","forks_url":"https://api.github.com/repos/Newsi/talk/forks","keys_url":"https://api.github.com/repos/Newsi/talk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Newsi/talk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Newsi/talk/teams","hooks_url":"https://api.github.com/repos/Newsi/talk/hooks","issue_events_url":"https://api.github.com/repos/Newsi/talk/issues/events{/number}","events_url":"https://api.github.com/repos/Newsi/talk/events","assignees_url":"https://api.github.com/repos/Newsi/talk/assignees{/user}","branches_url":"https://api.github.com/repos/Newsi/talk/branches{/branch}","tags_url":"https://api.github.com/repos/Newsi/talk/tags","blobs_url":"https://api.github.com/repos/Newsi/talk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Newsi/talk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Newsi/talk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Newsi/talk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Newsi/talk/statuses/{sha}","languages_url":"https://api.github.com/repos/Newsi/talk/languages","stargazers_url":"https://api.github.com/repos/Newsi/talk/stargazers","contributors_url":"https://api.github.com/repos/Newsi/talk/contributors","subscribers_url":"https://api.github.com/repos/Newsi/talk/subscribers","subscription_url":"https://api.github.com/repos/Newsi/talk/subscription","commits_url":"https://api.github.com/repos/Newsi/talk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Newsi/talk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Newsi/talk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Newsi/talk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Newsi/talk/contents/{+path}","compare_url":"https://api.github.com/repos/Newsi/talk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Newsi/talk/merges","archive_url":"https://api.github.com/repos/Newsi/talk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Newsi/talk/downloads","issues_url":"https://api.github.com/repos/Newsi/talk/issues{/number}","pulls_url":"https://api.github.com/repos/Newsi/talk/pulls{/number}","milestones_url":"https://api.github.com/repos/Newsi/talk/milestones{/number}","notifications_url":"https://api.github.com/repos/Newsi/talk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Newsi/talk/labels{/name}","releases_url":"https://api.github.com/repos/Newsi/talk/releases{/id}","deployments_url":"https://api.github.com/repos/Newsi/talk/deployments","created_at":"2017-11-09T10:32:42Z","updated_at":"2017-11-16T07:20:57Z","pushed_at":"2018-05-23T21:21:34Z","git_url":"git://github.com/Newsi/talk.git","ssh_url":"git@github.com:Newsi/talk.git","clone_url":"https://github.com/Newsi/talk.git","svn_url":"https://github.com/Newsi/talk","homepage":"https://coralproject.net/","size":11787,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Newsi:master","ref":"master","sha":"e570da80514f120f8577e63cf49fd4983584f41a","user":{"login":"Newsi","id":15358153,"avatar_url":"https://avatars3.githubusercontent.com/u/15358153?v=4","gravatar_id":"","url":"https://api.github.com/users/Newsi","html_url":"https://github.com/Newsi","followers_url":"https://api.github.com/users/Newsi/followers","following_url":"https://api.github.com/users/Newsi/following{/other_user}","gists_url":"https://api.github.com/users/Newsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Newsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Newsi/subscriptions","organizations_url":"https://api.github.com/users/Newsi/orgs","repos_url":"https://api.github.com/users/Newsi/repos","events_url":"https://api.github.com/users/Newsi/events{/privacy}","received_events_url":"https://api.github.com/users/Newsi/received_events","type":"Organization","site_admin":false},"repo":{"id":110101517,"name":"talk","full_name":"Newsi/talk","owner":{"login":"Newsi","id":15358153,"avatar_url":"https://avatars3.githubusercontent.com/u/15358153?v=4","gravatar_id":"","url":"https://api.github.com/users/Newsi","html_url":"https://github.com/Newsi","followers_url":"https://api.github.com/users/Newsi/followers","following_url":"https://api.github.com/users/Newsi/following{/other_user}","gists_url":"https://api.github.com/users/Newsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Newsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Newsi/subscriptions","organizations_url":"https://api.github.com/users/Newsi/orgs","repos_url":"https://api.github.com/users/Newsi/repos","events_url":"https://api.github.com/users/Newsi/events{/privacy}","received_events_url":"https://api.github.com/users/Newsi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Newsi/talk","description":"A better commenting experience from Mozilla, The Washington Post, and The New York Times.","fork":true,"url":"https://api.github.com/repos/Newsi/talk","forks_url":"https://api.github.com/repos/Newsi/talk/forks","keys_url":"https://api.github.com/repos/Newsi/talk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Newsi/talk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Newsi/talk/teams","hooks_url":"https://api.github.com/repos/Newsi/talk/hooks","issue_events_url":"https://api.github.com/repos/Newsi/talk/issues/events{/number}","events_url":"https://api.github.com/repos/Newsi/talk/events","assignees_url":"https://api.github.com/repos/Newsi/talk/assignees{/user}","branches_url":"https://api.github.com/repos/Newsi/talk/branches{/branch}","tags_url":"https://api.github.com/repos/Newsi/talk/tags","blobs_url":"https://api.github.com/repos/Newsi/talk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Newsi/talk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Newsi/talk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Newsi/talk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Newsi/talk/statuses/{sha}","languages_url":"https://api.github.com/repos/Newsi/talk/languages","stargazers_url":"https://api.github.com/repos/Newsi/talk/stargazers","contributors_url":"https://api.github.com/repos/Newsi/talk/contributors","subscribers_url":"https://api.github.com/repos/Newsi/talk/subscribers","subscription_url":"https://api.github.com/repos/Newsi/talk/subscription","commits_url":"https://api.github.com/repos/Newsi/talk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Newsi/talk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Newsi/talk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Newsi/talk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Newsi/talk/contents/{+path}","compare_url":"https://api.github.com/repos/Newsi/talk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Newsi/talk/merges","archive_url":"https://api.github.com/repos/Newsi/talk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Newsi/talk/downloads","issues_url":"https://api.github.com/repos/Newsi/talk/issues{/number}","pulls_url":"https://api.github.com/repos/Newsi/talk/pulls{/number}","milestones_url":"https://api.github.com/repos/Newsi/talk/milestones{/number}","notifications_url":"https://api.github.com/repos/Newsi/talk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Newsi/talk/labels{/name}","releases_url":"https://api.github.com/repos/Newsi/talk/releases{/id}","deployments_url":"https://api.github.com/repos/Newsi/talk/deployments","created_at":"2017-11-09T10:32:42Z","updated_at":"2017-11-16T07:20:57Z","pushed_at":"2018-05-23T21:21:34Z","git_url":"git://github.com/Newsi/talk.git","ssh_url":"git@github.com:Newsi/talk.git","clone_url":"https://github.com/Newsi/talk.git","svn_url":"https://github.com/Newsi/talk","homepage":"https://coralproject.net/","size":11787,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Newsi/talk/pulls/53"},"html":{"href":"https://github.com/Newsi/talk/pull/53"},"issue":{"href":"https://api.github.com/repos/Newsi/talk/issues/53"},"comments":{"href":"https://api.github.com/repos/Newsi/talk/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/Newsi/talk/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/Newsi/talk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Newsi/talk/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/Newsi/talk/statuses/6ebbfea5d3b86805162ff5f48df44e969fc58ef4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"racc-oo-n"}}