{"action":"created","comment":{"url":"https://api.github.com/repos/samvera/hyrax/pulls/comments/137122378","pull_request_review_id":60749406,"id":137122378,"diff_hunk":"@@ -0,0 +1,27 @@\n+App.cable.subscriptions.create(\"Hyrax::NotificationsChannel\", {\n+    connected: function(data) {\n+        this.perform(\"update_locale\", { locale: $('html').attr('lang') })\n+    },\n+\n+    received: function(data) {\n+        let count = data[\"notify_number\"];","path":"app/assets/javascripts/hyrax/channels/notifications.js","position":7,"original_position":7,"commit_id":"56e68515a666fa2cec81241bc8f8691020340962","original_commit_id":"56e68515a666fa2cec81241bc8f8691020340962","user":{"login":"mjgiarlo","id":131982,"avatar_url":"https://avatars0.githubusercontent.com/u/131982?v=4","gravatar_id":"","url":"https://api.github.com/users/mjgiarlo","html_url":"https://github.com/mjgiarlo","followers_url":"https://api.github.com/users/mjgiarlo/followers","following_url":"https://api.github.com/users/mjgiarlo/following{/other_user}","gists_url":"https://api.github.com/users/mjgiarlo/gists{/gist_id}","starred_url":"https://api.github.com/users/mjgiarlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjgiarlo/subscriptions","organizations_url":"https://api.github.com/users/mjgiarlo/orgs","repos_url":"https://api.github.com/users/mjgiarlo/repos","events_url":"https://api.github.com/users/mjgiarlo/events{/privacy}","received_events_url":"https://api.github.com/users/mjgiarlo/received_events","type":"User","site_admin":false},"body":"Whenever a notification is created for a user, two bits of data are passed via the websocket: the number of unread notifications and a message like \"You have 12 notifications\" that is translated into the user's preferred locale (or the default locale if no preference exists).","created_at":"2017-09-05T21:41:15Z","updated_at":"2017-09-05T21:41:15Z","html_url":"https://github.com/samvera/hyrax/pull/1624#discussion_r137122378","pull_request_url":"https://api.github.com/repos/samvera/hyrax/pulls/1624","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/samvera/hyrax/pulls/comments/137122378"},"html":{"href":"https://github.com/samvera/hyrax/pull/1624#discussion_r137122378"},"pull_request":{"href":"https://api.github.com/repos/samvera/hyrax/pulls/1624"}}},"pull_request":{"url":"https://api.github.com/repos/samvera/hyrax/pulls/1624","id":139426468,"html_url":"https://github.com/samvera/hyrax/pull/1624","diff_url":"https://github.com/samvera/hyrax/pull/1624.diff","patch_url":"https://github.com/samvera/hyrax/pull/1624.patch","issue_url":"https://api.github.com/repos/samvera/hyrax/issues/1624","number":1624,"state":"open","locked":false,"title":"[WIP] Use websockets for notifications instead of polling","user":{"login":"mjgiarlo","id":131982,"avatar_url":"https://avatars0.githubusercontent.com/u/131982?v=4","gravatar_id":"","url":"https://api.github.com/users/mjgiarlo","html_url":"https://github.com/mjgiarlo","followers_url":"https://api.github.com/users/mjgiarlo/followers","following_url":"https://api.github.com/users/mjgiarlo/following{/other_user}","gists_url":"https://api.github.com/users/mjgiarlo/gists{/gist_id}","starred_url":"https://api.github.com/users/mjgiarlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjgiarlo/subscriptions","organizations_url":"https://api.github.com/users/mjgiarlo/orgs","repos_url":"https://api.github.com/users/mjgiarlo/repos","events_url":"https://api.github.com/users/mjgiarlo/events{/privacy}","received_events_url":"https://api.github.com/users/mjgiarlo/received_events","type":"User","site_admin":false},"body":"This is quite WIP-y. Needs code review and tests. Sharing this now to get initial feedback on the approach I've taken.\r\n\r\n@samvera/hyrax-code-reviewers\r\n","created_at":"2017-09-05T21:34:27Z","updated_at":"2017-09-05T21:41:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7ce7ee808979b284be016f7fb7e1642426b7a9f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/samvera/hyrax/pulls/1624/commits","review_comments_url":"https://api.github.com/repos/samvera/hyrax/pulls/1624/comments","review_comment_url":"https://api.github.com/repos/samvera/hyrax/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samvera/hyrax/issues/1624/comments","statuses_url":"https://api.github.com/repos/samvera/hyrax/statuses/56e68515a666fa2cec81241bc8f8691020340962","head":{"label":"samvera:use_websockets_for_notifications_124","ref":"use_websockets_for_notifications_124","sha":"56e68515a666fa2cec81241bc8f8691020340962","user":{"login":"samvera","id":109426,"avatar_url":"https://avatars2.githubusercontent.com/u/109426?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera","html_url":"https://github.com/samvera","followers_url":"https://api.github.com/users/samvera/followers","following_url":"https://api.github.com/users/samvera/following{/other_user}","gists_url":"https://api.github.com/users/samvera/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera/subscriptions","organizations_url":"https://api.github.com/users/samvera/orgs","repos_url":"https://api.github.com/users/samvera/repos","events_url":"https://api.github.com/users/samvera/events{/privacy}","received_events_url":"https://api.github.com/users/samvera/received_events","type":"Organization","site_admin":false},"repo":{"id":75130658,"name":"hyrax","full_name":"samvera/hyrax","owner":{"login":"samvera","id":109426,"avatar_url":"https://avatars2.githubusercontent.com/u/109426?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera","html_url":"https://github.com/samvera","followers_url":"https://api.github.com/users/samvera/followers","following_url":"https://api.github.com/users/samvera/following{/other_user}","gists_url":"https://api.github.com/users/samvera/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera/subscriptions","organizations_url":"https://api.github.com/users/samvera/orgs","repos_url":"https://api.github.com/users/samvera/repos","events_url":"https://api.github.com/users/samvera/events{/privacy}","received_events_url":"https://api.github.com/users/samvera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/samvera/hyrax","description":"Hyrax is a front-end based on the robust Samvera framework, providing a user interface for common repository features","fork":false,"url":"https://api.github.com/repos/samvera/hyrax","forks_url":"https://api.github.com/repos/samvera/hyrax/forks","keys_url":"https://api.github.com/repos/samvera/hyrax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samvera/hyrax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samvera/hyrax/teams","hooks_url":"https://api.github.com/repos/samvera/hyrax/hooks","issue_events_url":"https://api.github.com/repos/samvera/hyrax/issues/events{/number}","events_url":"https://api.github.com/repos/samvera/hyrax/events","assignees_url":"https://api.github.com/repos/samvera/hyrax/assignees{/user}","branches_url":"https://api.github.com/repos/samvera/hyrax/branches{/branch}","tags_url":"https://api.github.com/repos/samvera/hyrax/tags","blobs_url":"https://api.github.com/repos/samvera/hyrax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samvera/hyrax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samvera/hyrax/git/refs{/sha}","trees_url":"https://api.github.com/repos/samvera/hyrax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samvera/hyrax/statuses/{sha}","languages_url":"https://api.github.com/repos/samvera/hyrax/languages","stargazers_url":"https://api.github.com/repos/samvera/hyrax/stargazers","contributors_url":"https://api.github.com/repos/samvera/hyrax/contributors","subscribers_url":"https://api.github.com/repos/samvera/hyrax/subscribers","subscription_url":"https://api.github.com/repos/samvera/hyrax/subscription","commits_url":"https://api.github.com/repos/samvera/hyrax/commits{/sha}","git_commits_url":"https://api.github.com/repos/samvera/hyrax/git/commits{/sha}","comments_url":"https://api.github.com/repos/samvera/hyrax/comments{/number}","issue_comment_url":"https://api.github.com/repos/samvera/hyrax/issues/comments{/number}","contents_url":"https://api.github.com/repos/samvera/hyrax/contents/{+path}","compare_url":"https://api.github.com/repos/samvera/hyrax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samvera/hyrax/merges","archive_url":"https://api.github.com/repos/samvera/hyrax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samvera/hyrax/downloads","issues_url":"https://api.github.com/repos/samvera/hyrax/issues{/number}","pulls_url":"https://api.github.com/repos/samvera/hyrax/pulls{/number}","milestones_url":"https://api.github.com/repos/samvera/hyrax/milestones{/number}","notifications_url":"https://api.github.com/repos/samvera/hyrax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samvera/hyrax/labels{/name}","releases_url":"https://api.github.com/repos/samvera/hyrax/releases{/id}","deployments_url":"https://api.github.com/repos/samvera/hyrax/deployments","created_at":"2016-11-29T23:09:59Z","updated_at":"2017-08-31T03:00:46Z","pushed_at":"2017-09-05T21:36:31Z","git_url":"git://github.com/samvera/hyrax.git","ssh_url":"git@github.com:samvera/hyrax.git","clone_url":"https://github.com/samvera/hyrax.git","svn_url":"https://github.com/samvera/hyrax","homepage":"http://hyr.ax/","size":62932,"stargazers_count":46,"watchers_count":46,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":381,"forks":39,"open_issues":381,"watchers":46,"default_branch":"master"}},"base":{"label":"samvera:master","ref":"master","sha":"9928dcb88546013de506b89f13e694494b051453","user":{"login":"samvera","id":109426,"avatar_url":"https://avatars2.githubusercontent.com/u/109426?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera","html_url":"https://github.com/samvera","followers_url":"https://api.github.com/users/samvera/followers","following_url":"https://api.github.com/users/samvera/following{/other_user}","gists_url":"https://api.github.com/users/samvera/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera/subscriptions","organizations_url":"https://api.github.com/users/samvera/orgs","repos_url":"https://api.github.com/users/samvera/repos","events_url":"https://api.github.com/users/samvera/events{/privacy}","received_events_url":"https://api.github.com/users/samvera/received_events","type":"Organization","site_admin":false},"repo":{"id":75130658,"name":"hyrax","full_name":"samvera/hyrax","owner":{"login":"samvera","id":109426,"avatar_url":"https://avatars2.githubusercontent.com/u/109426?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera","html_url":"https://github.com/samvera","followers_url":"https://api.github.com/users/samvera/followers","following_url":"https://api.github.com/users/samvera/following{/other_user}","gists_url":"https://api.github.com/users/samvera/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera/subscriptions","organizations_url":"https://api.github.com/users/samvera/orgs","repos_url":"https://api.github.com/users/samvera/repos","events_url":"https://api.github.com/users/samvera/events{/privacy}","received_events_url":"https://api.github.com/users/samvera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/samvera/hyrax","description":"Hyrax is a front-end based on the robust Samvera framework, providing a user interface for common repository features","fork":false,"url":"https://api.github.com/repos/samvera/hyrax","forks_url":"https://api.github.com/repos/samvera/hyrax/forks","keys_url":"https://api.github.com/repos/samvera/hyrax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samvera/hyrax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samvera/hyrax/teams","hooks_url":"https://api.github.com/repos/samvera/hyrax/hooks","issue_events_url":"https://api.github.com/repos/samvera/hyrax/issues/events{/number}","events_url":"https://api.github.com/repos/samvera/hyrax/events","assignees_url":"https://api.github.com/repos/samvera/hyrax/assignees{/user}","branches_url":"https://api.github.com/repos/samvera/hyrax/branches{/branch}","tags_url":"https://api.github.com/repos/samvera/hyrax/tags","blobs_url":"https://api.github.com/repos/samvera/hyrax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samvera/hyrax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samvera/hyrax/git/refs{/sha}","trees_url":"https://api.github.com/repos/samvera/hyrax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samvera/hyrax/statuses/{sha}","languages_url":"https://api.github.com/repos/samvera/hyrax/languages","stargazers_url":"https://api.github.com/repos/samvera/hyrax/stargazers","contributors_url":"https://api.github.com/repos/samvera/hyrax/contributors","subscribers_url":"https://api.github.com/repos/samvera/hyrax/subscribers","subscription_url":"https://api.github.com/repos/samvera/hyrax/subscription","commits_url":"https://api.github.com/repos/samvera/hyrax/commits{/sha}","git_commits_url":"https://api.github.com/repos/samvera/hyrax/git/commits{/sha}","comments_url":"https://api.github.com/repos/samvera/hyrax/comments{/number}","issue_comment_url":"https://api.github.com/repos/samvera/hyrax/issues/comments{/number}","contents_url":"https://api.github.com/repos/samvera/hyrax/contents/{+path}","compare_url":"https://api.github.com/repos/samvera/hyrax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samvera/hyrax/merges","archive_url":"https://api.github.com/repos/samvera/hyrax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samvera/hyrax/downloads","issues_url":"https://api.github.com/repos/samvera/hyrax/issues{/number}","pulls_url":"https://api.github.com/repos/samvera/hyrax/pulls{/number}","milestones_url":"https://api.github.com/repos/samvera/hyrax/milestones{/number}","notifications_url":"https://api.github.com/repos/samvera/hyrax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samvera/hyrax/labels{/name}","releases_url":"https://api.github.com/repos/samvera/hyrax/releases{/id}","deployments_url":"https://api.github.com/repos/samvera/hyrax/deployments","created_at":"2016-11-29T23:09:59Z","updated_at":"2017-08-31T03:00:46Z","pushed_at":"2017-09-05T21:36:31Z","git_url":"git://github.com/samvera/hyrax.git","ssh_url":"git@github.com:samvera/hyrax.git","clone_url":"https://github.com/samvera/hyrax.git","svn_url":"https://github.com/samvera/hyrax","homepage":"http://hyr.ax/","size":62932,"stargazers_count":46,"watchers_count":46,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":381,"forks":39,"open_issues":381,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samvera/hyrax/pulls/1624"},"html":{"href":"https://github.com/samvera/hyrax/pull/1624"},"issue":{"href":"https://api.github.com/repos/samvera/hyrax/issues/1624"},"comments":{"href":"https://api.github.com/repos/samvera/hyrax/issues/1624/comments"},"review_comments":{"href":"https://api.github.com/repos/samvera/hyrax/pulls/1624/comments"},"review_comment":{"href":"https://api.github.com/repos/samvera/hyrax/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samvera/hyrax/pulls/1624/commits"},"statuses":{"href":"https://api.github.com/repos/samvera/hyrax/statuses/56e68515a666fa2cec81241bc8f8691020340962"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mjgiarlo"}}