{"action":"created","comment":{"url":"https://api.github.com/repos/dionyziz/ting/pulls/comments/42322517","id":42322517,"diff_hunk":"@@ -164,35 +176,37 @@ socket.on('connection', function (client) {\n             return;\n         }\n \n-        messages_typing[data.messageid].text = data.text;\n+        messages_typing[data.messageid].text = data.text; //update the text\n         socket.sockets.emit('update-typing-messages', messages_typing);\n \n-        if (data.text.trim().length == 0) {\n+        if (data.text.trim().length == 0) { //if message is deleted, then we delete its info\n             delete messages_typing[data.messageid];\n \n             deletePersistentMessage(data.messageid);\n         }\n     })\n \n+    //when user is disconnected that function is executed","path":"realtime/server.js","position":142,"original_position":142,"commit_id":"5edf73a055f1663087acb5889915f8b6faf666ac","original_commit_id":"5edf73a055f1663087acb5889915f8b6faf666ac","user":{"login":"dionyziz","id":544572,"avatar_url":"https://avatars.githubusercontent.com/u/544572?v=3","gravatar_id":"","url":"https://api.github.com/users/dionyziz","html_url":"https://github.com/dionyziz","followers_url":"https://api.github.com/users/dionyziz/followers","following_url":"https://api.github.com/users/dionyziz/following{/other_user}","gists_url":"https://api.github.com/users/dionyziz/gists{/gist_id}","starred_url":"https://api.github.com/users/dionyziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dionyziz/subscriptions","organizations_url":"https://api.github.com/users/dionyziz/orgs","repos_url":"https://api.github.com/users/dionyziz/repos","events_url":"https://api.github.com/users/dionyziz/events{/privacy}","received_events_url":"https://api.github.com/users/dionyziz/received_events","type":"User","site_admin":false},"body":"Obvious from event name","created_at":"2015-10-18T16:04:16Z","updated_at":"2015-10-18T16:04:16Z","html_url":"https://github.com/dionyziz/ting/pull/135#discussion_r42322517","pull_request_url":"https://api.github.com/repos/dionyziz/ting/pulls/135","_links":{"self":{"href":"https://api.github.com/repos/dionyziz/ting/pulls/comments/42322517"},"html":{"href":"https://github.com/dionyziz/ting/pull/135#discussion_r42322517"},"pull_request":{"href":"https://api.github.com/repos/dionyziz/ting/pulls/135"}}},"pull_request":{"url":"https://api.github.com/repos/dionyziz/ting/pulls/135","id":48011148,"html_url":"https://github.com/dionyziz/ting/pull/135","diff_url":"https://github.com/dionyziz/ting/pull/135.diff","patch_url":"https://github.com/dionyziz/ting/pull/135.patch","issue_url":"https://api.github.com/repos/dionyziz/ting/issues/135","number":135,"state":"open","locked":false,"title":"added comments","user":{"login":"Hepic","id":7916791,"avatar_url":"https://avatars.githubusercontent.com/u/7916791?v=3","gravatar_id":"","url":"https://api.github.com/users/Hepic","html_url":"https://github.com/Hepic","followers_url":"https://api.github.com/users/Hepic/followers","following_url":"https://api.github.com/users/Hepic/following{/other_user}","gists_url":"https://api.github.com/users/Hepic/gists{/gist_id}","starred_url":"https://api.github.com/users/Hepic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hepic/subscriptions","organizations_url":"https://api.github.com/users/Hepic/orgs","repos_url":"https://api.github.com/users/Hepic/repos","events_url":"https://api.github.com/users/Hepic/events{/privacy}","received_events_url":"https://api.github.com/users/Hepic/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-18T15:54:12Z","updated_at":"2015-10-18T16:04:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6621f1fac9c61b110d395aa0722afbd4d72d9d6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dionyziz/ting/pulls/135/commits","review_comments_url":"https://api.github.com/repos/dionyziz/ting/pulls/135/comments","review_comment_url":"https://api.github.com/repos/dionyziz/ting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dionyziz/ting/issues/135/comments","statuses_url":"https://api.github.com/repos/dionyziz/ting/statuses/5edf73a055f1663087acb5889915f8b6faf666ac","head":{"label":"Hepic:comment","ref":"comment","sha":"5edf73a055f1663087acb5889915f8b6faf666ac","user":{"login":"Hepic","id":7916791,"avatar_url":"https://avatars.githubusercontent.com/u/7916791?v=3","gravatar_id":"","url":"https://api.github.com/users/Hepic","html_url":"https://github.com/Hepic","followers_url":"https://api.github.com/users/Hepic/followers","following_url":"https://api.github.com/users/Hepic/following{/other_user}","gists_url":"https://api.github.com/users/Hepic/gists{/gist_id}","starred_url":"https://api.github.com/users/Hepic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hepic/subscriptions","organizations_url":"https://api.github.com/users/Hepic/orgs","repos_url":"https://api.github.com/users/Hepic/repos","events_url":"https://api.github.com/users/Hepic/events{/privacy}","received_events_url":"https://api.github.com/users/Hepic/received_events","type":"User","site_admin":false},"repo":{"id":44333306,"name":"ting-1","full_name":"Hepic/ting-1","owner":{"login":"Hepic","id":7916791,"avatar_url":"https://avatars.githubusercontent.com/u/7916791?v=3","gravatar_id":"","url":"https://api.github.com/users/Hepic","html_url":"https://github.com/Hepic","followers_url":"https://api.github.com/users/Hepic/followers","following_url":"https://api.github.com/users/Hepic/following{/other_user}","gists_url":"https://api.github.com/users/Hepic/gists{/gist_id}","starred_url":"https://api.github.com/users/Hepic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hepic/subscriptions","organizations_url":"https://api.github.com/users/Hepic/orgs","repos_url":"https://api.github.com/users/Hepic/repos","events_url":"https://api.github.com/users/Hepic/events{/privacy}","received_events_url":"https://api.github.com/users/Hepic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hepic/ting-1","description":"A chat system","fork":true,"url":"https://api.github.com/repos/Hepic/ting-1","forks_url":"https://api.github.com/repos/Hepic/ting-1/forks","keys_url":"https://api.github.com/repos/Hepic/ting-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hepic/ting-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hepic/ting-1/teams","hooks_url":"https://api.github.com/repos/Hepic/ting-1/hooks","issue_events_url":"https://api.github.com/repos/Hepic/ting-1/issues/events{/number}","events_url":"https://api.github.com/repos/Hepic/ting-1/events","assignees_url":"https://api.github.com/repos/Hepic/ting-1/assignees{/user}","branches_url":"https://api.github.com/repos/Hepic/ting-1/branches{/branch}","tags_url":"https://api.github.com/repos/Hepic/ting-1/tags","blobs_url":"https://api.github.com/repos/Hepic/ting-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hepic/ting-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hepic/ting-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hepic/ting-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hepic/ting-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Hepic/ting-1/languages","stargazers_url":"https://api.github.com/repos/Hepic/ting-1/stargazers","contributors_url":"https://api.github.com/repos/Hepic/ting-1/contributors","subscribers_url":"https://api.github.com/repos/Hepic/ting-1/subscribers","subscription_url":"https://api.github.com/repos/Hepic/ting-1/subscription","commits_url":"https://api.github.com/repos/Hepic/ting-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hepic/ting-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hepic/ting-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hepic/ting-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hepic/ting-1/contents/{+path}","compare_url":"https://api.github.com/repos/Hepic/ting-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hepic/ting-1/merges","archive_url":"https://api.github.com/repos/Hepic/ting-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hepic/ting-1/downloads","issues_url":"https://api.github.com/repos/Hepic/ting-1/issues{/number}","pulls_url":"https://api.github.com/repos/Hepic/ting-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Hepic/ting-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Hepic/ting-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hepic/ting-1/labels{/name}","releases_url":"https://api.github.com/repos/Hepic/ting-1/releases{/id}","created_at":"2015-10-15T17:15:58Z","updated_at":"2015-10-15T17:15:58Z","pushed_at":"2015-10-18T15:49:06Z","git_url":"git://github.com/Hepic/ting-1.git","ssh_url":"git@github.com:Hepic/ting-1.git","clone_url":"https://github.com/Hepic/ting-1.git","svn_url":"https://github.com/Hepic/ting-1","homepage":null,"size":2066,"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":"dionyziz:master","ref":"master","sha":"07dae421e6974e5a4a635c0ffdcb4a32c8d879c3","user":{"login":"dionyziz","id":544572,"avatar_url":"https://avatars.githubusercontent.com/u/544572?v=3","gravatar_id":"","url":"https://api.github.com/users/dionyziz","html_url":"https://github.com/dionyziz","followers_url":"https://api.github.com/users/dionyziz/followers","following_url":"https://api.github.com/users/dionyziz/following{/other_user}","gists_url":"https://api.github.com/users/dionyziz/gists{/gist_id}","starred_url":"https://api.github.com/users/dionyziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dionyziz/subscriptions","organizations_url":"https://api.github.com/users/dionyziz/orgs","repos_url":"https://api.github.com/users/dionyziz/repos","events_url":"https://api.github.com/users/dionyziz/events{/privacy}","received_events_url":"https://api.github.com/users/dionyziz/received_events","type":"User","site_admin":false},"repo":{"id":34073335,"name":"ting","full_name":"dionyziz/ting","owner":{"login":"dionyziz","id":544572,"avatar_url":"https://avatars.githubusercontent.com/u/544572?v=3","gravatar_id":"","url":"https://api.github.com/users/dionyziz","html_url":"https://github.com/dionyziz","followers_url":"https://api.github.com/users/dionyziz/followers","following_url":"https://api.github.com/users/dionyziz/following{/other_user}","gists_url":"https://api.github.com/users/dionyziz/gists{/gist_id}","starred_url":"https://api.github.com/users/dionyziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dionyziz/subscriptions","organizations_url":"https://api.github.com/users/dionyziz/orgs","repos_url":"https://api.github.com/users/dionyziz/repos","events_url":"https://api.github.com/users/dionyziz/events{/privacy}","received_events_url":"https://api.github.com/users/dionyziz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dionyziz/ting","description":"A chat system","fork":false,"url":"https://api.github.com/repos/dionyziz/ting","forks_url":"https://api.github.com/repos/dionyziz/ting/forks","keys_url":"https://api.github.com/repos/dionyziz/ting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dionyziz/ting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dionyziz/ting/teams","hooks_url":"https://api.github.com/repos/dionyziz/ting/hooks","issue_events_url":"https://api.github.com/repos/dionyziz/ting/issues/events{/number}","events_url":"https://api.github.com/repos/dionyziz/ting/events","assignees_url":"https://api.github.com/repos/dionyziz/ting/assignees{/user}","branches_url":"https://api.github.com/repos/dionyziz/ting/branches{/branch}","tags_url":"https://api.github.com/repos/dionyziz/ting/tags","blobs_url":"https://api.github.com/repos/dionyziz/ting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dionyziz/ting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dionyziz/ting/git/refs{/sha}","trees_url":"https://api.github.com/repos/dionyziz/ting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dionyziz/ting/statuses/{sha}","languages_url":"https://api.github.com/repos/dionyziz/ting/languages","stargazers_url":"https://api.github.com/repos/dionyziz/ting/stargazers","contributors_url":"https://api.github.com/repos/dionyziz/ting/contributors","subscribers_url":"https://api.github.com/repos/dionyziz/ting/subscribers","subscription_url":"https://api.github.com/repos/dionyziz/ting/subscription","commits_url":"https://api.github.com/repos/dionyziz/ting/commits{/sha}","git_commits_url":"https://api.github.com/repos/dionyziz/ting/git/commits{/sha}","comments_url":"https://api.github.com/repos/dionyziz/ting/comments{/number}","issue_comment_url":"https://api.github.com/repos/dionyziz/ting/issues/comments{/number}","contents_url":"https://api.github.com/repos/dionyziz/ting/contents/{+path}","compare_url":"https://api.github.com/repos/dionyziz/ting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dionyziz/ting/merges","archive_url":"https://api.github.com/repos/dionyziz/ting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dionyziz/ting/downloads","issues_url":"https://api.github.com/repos/dionyziz/ting/issues{/number}","pulls_url":"https://api.github.com/repos/dionyziz/ting/pulls{/number}","milestones_url":"https://api.github.com/repos/dionyziz/ting/milestones{/number}","notifications_url":"https://api.github.com/repos/dionyziz/ting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dionyziz/ting/labels{/name}","releases_url":"https://api.github.com/repos/dionyziz/ting/releases{/id}","created_at":"2015-04-16T18:31:45Z","updated_at":"2015-10-05T17:16:15Z","pushed_at":"2015-10-18T15:54:12Z","git_url":"git://github.com/dionyziz/ting.git","ssh_url":"git@github.com:dionyziz/ting.git","clone_url":"https://github.com/dionyziz/ting.git","svn_url":"https://github.com/dionyziz/ting","homepage":null,"size":2066,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dionyziz/ting/pulls/135"},"html":{"href":"https://github.com/dionyziz/ting/pull/135"},"issue":{"href":"https://api.github.com/repos/dionyziz/ting/issues/135"},"comments":{"href":"https://api.github.com/repos/dionyziz/ting/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/dionyziz/ting/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/dionyziz/ting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dionyziz/ting/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/dionyziz/ting/statuses/5edf73a055f1663087acb5889915f8b6faf666ac"}}}}