{"action":"created","issue":{"url":"https://api.github.com/repos/incompl/cloak/issues/85","labels_url":"https://api.github.com/repos/incompl/cloak/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/incompl/cloak/issues/85/comments","events_url":"https://api.github.com/repos/incompl/cloak/issues/85/events","html_url":"https://github.com/incompl/cloak/pull/85","id":58570853,"number":85,"title":"added clientEvents to server configuration for getting lifecycle changes...","user":{"login":"vstirbu","id":1288047,"avatar_url":"https://avatars.githubusercontent.com/u/1288047?v=3","gravatar_id":"","url":"https://api.github.com/users/vstirbu","html_url":"https://github.com/vstirbu","followers_url":"https://api.github.com/users/vstirbu/followers","following_url":"https://api.github.com/users/vstirbu/following{/other_user}","gists_url":"https://api.github.com/users/vstirbu/gists{/gist_id}","starred_url":"https://api.github.com/users/vstirbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstirbu/subscriptions","organizations_url":"https://api.github.com/users/vstirbu/orgs","repos_url":"https://api.github.com/users/vstirbu/repos","events_url":"https://api.github.com/users/vstirbu/events{/privacy}","received_events_url":"https://api.github.com/users/vstirbu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-23T10:57:25Z","updated_at":"2015-02-25T11:29:06Z","closed_at":"2015-02-24T19:39:49Z","pull_request":{"url":"https://api.github.com/repos/incompl/cloak/pulls/85","html_url":"https://github.com/incompl/cloak/pull/85","diff_url":"https://github.com/incompl/cloak/pull/85.diff","patch_url":"https://github.com/incompl/cloak/pull/85.patch"},"body":"The pull request extends the server configuration with ```clientEvents``` that contains ```disconnect``` and ```resume``` handlers for detecting changes in client's connection state:\r\n\r\n```javascript\r\nvar serverconfiguration = {\r\n   clientEvents: {\r\n      disconnect: function (user) {\r\n         console.log('user disconnected', user);\r\n      },\r\n      resume: function (user) {\r\n         console.log('user resumed connection', user);\r\n      },\r\n   }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/incompl/cloak/issues/comments/75945285","html_url":"https://github.com/incompl/cloak/pull/85#issuecomment-75945285","issue_url":"https://api.github.com/repos/incompl/cloak/issues/85","id":75945285,"user":{"login":"vstirbu","id":1288047,"avatar_url":"https://avatars.githubusercontent.com/u/1288047?v=3","gravatar_id":"","url":"https://api.github.com/users/vstirbu","html_url":"https://github.com/vstirbu","followers_url":"https://api.github.com/users/vstirbu/followers","following_url":"https://api.github.com/users/vstirbu/following{/other_user}","gists_url":"https://api.github.com/users/vstirbu/gists{/gist_id}","starred_url":"https://api.github.com/users/vstirbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstirbu/subscriptions","organizations_url":"https://api.github.com/users/vstirbu/orgs","repos_url":"https://api.github.com/users/vstirbu/repos","events_url":"https://api.github.com/users/vstirbu/events{/privacy}","received_events_url":"https://api.github.com/users/vstirbu/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T11:29:06Z","updated_at":"2015-02-25T11:29:06Z","body":"nice try @jugglinmike, with appropriate VR goggles it might even be accurate... :p\r\n\r\nI'm using it for an electronic scoring system for martial arts competitions (takedown-do so far).\r\n\r\n"}}