{"action":"closed","number":7985,"pull_request":{"url":"https://api.github.com/repos/meteor/meteor/pulls/7985","id":91389972,"html_url":"https://github.com/meteor/meteor/pull/7985","diff_url":"https://github.com/meteor/meteor/pull/7985.diff","patch_url":"https://github.com/meteor/meteor/pull/7985.patch","issue_url":"https://api.github.com/repos/meteor/meteor/issues/7985","number":7985,"state":"closed","locked":false,"title":"add onMessage hook","user":{"login":"akvadrako","id":184545,"avatar_url":"https://avatars.githubusercontent.com/u/184545?v=3","gravatar_id":"","url":"https://api.github.com/users/akvadrako","html_url":"https://github.com/akvadrako","followers_url":"https://api.github.com/users/akvadrako/followers","following_url":"https://api.github.com/users/akvadrako/following{/other_user}","gists_url":"https://api.github.com/users/akvadrako/gists{/gist_id}","starred_url":"https://api.github.com/users/akvadrako/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvadrako/subscriptions","organizations_url":"https://api.github.com/users/akvadrako/orgs","repos_url":"https://api.github.com/users/akvadrako/repos","events_url":"https://api.github.com/users/akvadrako/events{/privacy}","received_events_url":"https://api.github.com/users/akvadrako/received_events","type":"User","site_admin":false},"body":"Like the `onConnection` hook, this is called for every DDP message received. We have a large meteor app and would like to centralise authorisation for publications and methods in the least error-prone way possible. Without any documented way to hook into the server core, the best we can do is monkey-patch `Session`. This PR provides a better way.\n","created_at":"2016-10-28T14:19:31Z","updated_at":"2016-12-14T00:17:51Z","closed_at":"2016-12-14T00:17:51Z","merged_at":"2016-12-14T00:17:51Z","merge_commit_sha":"84ed04b8f3b99cf16b5540f2e0193d47e4f8ccf6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/meteor/meteor/pulls/7985/commits","review_comments_url":"https://api.github.com/repos/meteor/meteor/pulls/7985/comments","review_comment_url":"https://api.github.com/repos/meteor/meteor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/7985/comments","statuses_url":"https://api.github.com/repos/meteor/meteor/statuses/6c1b0976fddfda6a31911d2fd7b20f28b64f8849","head":{"label":"akvadrako:on_message_hook","ref":"on_message_hook","sha":"6c1b0976fddfda6a31911d2fd7b20f28b64f8849","user":{"login":"akvadrako","id":184545,"avatar_url":"https://avatars.githubusercontent.com/u/184545?v=3","gravatar_id":"","url":"https://api.github.com/users/akvadrako","html_url":"https://github.com/akvadrako","followers_url":"https://api.github.com/users/akvadrako/followers","following_url":"https://api.github.com/users/akvadrako/following{/other_user}","gists_url":"https://api.github.com/users/akvadrako/gists{/gist_id}","starred_url":"https://api.github.com/users/akvadrako/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvadrako/subscriptions","organizations_url":"https://api.github.com/users/akvadrako/orgs","repos_url":"https://api.github.com/users/akvadrako/repos","events_url":"https://api.github.com/users/akvadrako/events{/privacy}","received_events_url":"https://api.github.com/users/akvadrako/received_events","type":"User","site_admin":false},"repo":{"id":72098460,"name":"meteor","full_name":"akvadrako/meteor","owner":{"login":"akvadrako","id":184545,"avatar_url":"https://avatars.githubusercontent.com/u/184545?v=3","gravatar_id":"","url":"https://api.github.com/users/akvadrako","html_url":"https://github.com/akvadrako","followers_url":"https://api.github.com/users/akvadrako/followers","following_url":"https://api.github.com/users/akvadrako/following{/other_user}","gists_url":"https://api.github.com/users/akvadrako/gists{/gist_id}","starred_url":"https://api.github.com/users/akvadrako/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvadrako/subscriptions","organizations_url":"https://api.github.com/users/akvadrako/orgs","repos_url":"https://api.github.com/users/akvadrako/repos","events_url":"https://api.github.com/users/akvadrako/events{/privacy}","received_events_url":"https://api.github.com/users/akvadrako/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akvadrako/meteor","description":"Meteor, the JavaScript App Platform","fork":true,"url":"https://api.github.com/repos/akvadrako/meteor","forks_url":"https://api.github.com/repos/akvadrako/meteor/forks","keys_url":"https://api.github.com/repos/akvadrako/meteor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akvadrako/meteor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akvadrako/meteor/teams","hooks_url":"https://api.github.com/repos/akvadrako/meteor/hooks","issue_events_url":"https://api.github.com/repos/akvadrako/meteor/issues/events{/number}","events_url":"https://api.github.com/repos/akvadrako/meteor/events","assignees_url":"https://api.github.com/repos/akvadrako/meteor/assignees{/user}","branches_url":"https://api.github.com/repos/akvadrako/meteor/branches{/branch}","tags_url":"https://api.github.com/repos/akvadrako/meteor/tags","blobs_url":"https://api.github.com/repos/akvadrako/meteor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akvadrako/meteor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akvadrako/meteor/git/refs{/sha}","trees_url":"https://api.github.com/repos/akvadrako/meteor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akvadrako/meteor/statuses/{sha}","languages_url":"https://api.github.com/repos/akvadrako/meteor/languages","stargazers_url":"https://api.github.com/repos/akvadrako/meteor/stargazers","contributors_url":"https://api.github.com/repos/akvadrako/meteor/contributors","subscribers_url":"https://api.github.com/repos/akvadrako/meteor/subscribers","subscription_url":"https://api.github.com/repos/akvadrako/meteor/subscription","commits_url":"https://api.github.com/repos/akvadrako/meteor/commits{/sha}","git_commits_url":"https://api.github.com/repos/akvadrako/meteor/git/commits{/sha}","comments_url":"https://api.github.com/repos/akvadrako/meteor/comments{/number}","issue_comment_url":"https://api.github.com/repos/akvadrako/meteor/issues/comments{/number}","contents_url":"https://api.github.com/repos/akvadrako/meteor/contents/{+path}","compare_url":"https://api.github.com/repos/akvadrako/meteor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akvadrako/meteor/merges","archive_url":"https://api.github.com/repos/akvadrako/meteor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akvadrako/meteor/downloads","issues_url":"https://api.github.com/repos/akvadrako/meteor/issues{/number}","pulls_url":"https://api.github.com/repos/akvadrako/meteor/pulls{/number}","milestones_url":"https://api.github.com/repos/akvadrako/meteor/milestones{/number}","notifications_url":"https://api.github.com/repos/akvadrako/meteor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akvadrako/meteor/labels{/name}","releases_url":"https://api.github.com/repos/akvadrako/meteor/releases{/id}","deployments_url":"https://api.github.com/repos/akvadrako/meteor/deployments","created_at":"2016-10-27T10:41:17Z","updated_at":"2016-10-27T10:41:47Z","pushed_at":"2016-10-28T14:12:59Z","git_url":"git://github.com/akvadrako/meteor.git","ssh_url":"git@github.com:akvadrako/meteor.git","clone_url":"https://github.com/akvadrako/meteor.git","svn_url":"https://github.com/akvadrako/meteor","homepage":"https://www.meteor.com","size":65293,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"devel"}},"base":{"label":"meteor:devel","ref":"devel","sha":"e462cf7133f731bc929ce5f16d8676b371996077","user":{"login":"meteor","id":789528,"avatar_url":"https://avatars.githubusercontent.com/u/789528?v=3","gravatar_id":"","url":"https://api.github.com/users/meteor","html_url":"https://github.com/meteor","followers_url":"https://api.github.com/users/meteor/followers","following_url":"https://api.github.com/users/meteor/following{/other_user}","gists_url":"https://api.github.com/users/meteor/gists{/gist_id}","starred_url":"https://api.github.com/users/meteor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meteor/subscriptions","organizations_url":"https://api.github.com/users/meteor/orgs","repos_url":"https://api.github.com/users/meteor/repos","events_url":"https://api.github.com/users/meteor/events{/privacy}","received_events_url":"https://api.github.com/users/meteor/received_events","type":"Organization","site_admin":false},"repo":{"id":3214406,"name":"meteor","full_name":"meteor/meteor","owner":{"login":"meteor","id":789528,"avatar_url":"https://avatars.githubusercontent.com/u/789528?v=3","gravatar_id":"","url":"https://api.github.com/users/meteor","html_url":"https://github.com/meteor","followers_url":"https://api.github.com/users/meteor/followers","following_url":"https://api.github.com/users/meteor/following{/other_user}","gists_url":"https://api.github.com/users/meteor/gists{/gist_id}","starred_url":"https://api.github.com/users/meteor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meteor/subscriptions","organizations_url":"https://api.github.com/users/meteor/orgs","repos_url":"https://api.github.com/users/meteor/repos","events_url":"https://api.github.com/users/meteor/events{/privacy}","received_events_url":"https://api.github.com/users/meteor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meteor/meteor","description":"Meteor, the JavaScript App Platform","fork":false,"url":"https://api.github.com/repos/meteor/meteor","forks_url":"https://api.github.com/repos/meteor/meteor/forks","keys_url":"https://api.github.com/repos/meteor/meteor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meteor/meteor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meteor/meteor/teams","hooks_url":"https://api.github.com/repos/meteor/meteor/hooks","issue_events_url":"https://api.github.com/repos/meteor/meteor/issues/events{/number}","events_url":"https://api.github.com/repos/meteor/meteor/events","assignees_url":"https://api.github.com/repos/meteor/meteor/assignees{/user}","branches_url":"https://api.github.com/repos/meteor/meteor/branches{/branch}","tags_url":"https://api.github.com/repos/meteor/meteor/tags","blobs_url":"https://api.github.com/repos/meteor/meteor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meteor/meteor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meteor/meteor/git/refs{/sha}","trees_url":"https://api.github.com/repos/meteor/meteor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meteor/meteor/statuses/{sha}","languages_url":"https://api.github.com/repos/meteor/meteor/languages","stargazers_url":"https://api.github.com/repos/meteor/meteor/stargazers","contributors_url":"https://api.github.com/repos/meteor/meteor/contributors","subscribers_url":"https://api.github.com/repos/meteor/meteor/subscribers","subscription_url":"https://api.github.com/repos/meteor/meteor/subscription","commits_url":"https://api.github.com/repos/meteor/meteor/commits{/sha}","git_commits_url":"https://api.github.com/repos/meteor/meteor/git/commits{/sha}","comments_url":"https://api.github.com/repos/meteor/meteor/comments{/number}","issue_comment_url":"https://api.github.com/repos/meteor/meteor/issues/comments{/number}","contents_url":"https://api.github.com/repos/meteor/meteor/contents/{+path}","compare_url":"https://api.github.com/repos/meteor/meteor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meteor/meteor/merges","archive_url":"https://api.github.com/repos/meteor/meteor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meteor/meteor/downloads","issues_url":"https://api.github.com/repos/meteor/meteor/issues{/number}","pulls_url":"https://api.github.com/repos/meteor/meteor/pulls{/number}","milestones_url":"https://api.github.com/repos/meteor/meteor/milestones{/number}","notifications_url":"https://api.github.com/repos/meteor/meteor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meteor/meteor/labels{/name}","releases_url":"https://api.github.com/repos/meteor/meteor/releases{/id}","deployments_url":"https://api.github.com/repos/meteor/meteor/deployments","created_at":"2012-01-19T01:58:17Z","updated_at":"2016-12-13T23:25:44Z","pushed_at":"2016-12-14T00:17:51Z","git_url":"git://github.com/meteor/meteor.git","ssh_url":"git@github.com:meteor/meteor.git","clone_url":"https://github.com/meteor/meteor.git","svn_url":"https://github.com/meteor/meteor","homepage":"https://www.meteor.com","size":65977,"stargazers_count":36177,"watchers_count":36177,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4495,"mirror_url":null,"open_issues_count":839,"forks":4495,"open_issues":839,"watchers":36177,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/meteor/meteor/pulls/7985"},"html":{"href":"https://github.com/meteor/meteor/pull/7985"},"issue":{"href":"https://api.github.com/repos/meteor/meteor/issues/7985"},"comments":{"href":"https://api.github.com/repos/meteor/meteor/issues/7985/comments"},"review_comments":{"href":"https://api.github.com/repos/meteor/meteor/pulls/7985/comments"},"review_comment":{"href":"https://api.github.com/repos/meteor/meteor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meteor/meteor/pulls/7985/commits"},"statuses":{"href":"https://api.github.com/repos/meteor/meteor/statuses/6c1b0976fddfda6a31911d2fd7b20f28b64f8849"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"benjamn","id":5750,"avatar_url":"https://avatars.githubusercontent.com/u/5750?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},"comments":16,"review_comments":3,"commits":1,"additions":45,"deletions":2,"changed_files":3}}
{"actor":{"display_login":"benjamn"}}