{"action":"created","comment":{"url":"https://api.github.com/repos/andela/anbu-cfh/pulls/comments/93338807","pull_request_review_id":13864479,"id":93338807,"diff_hunk":"@@ -0,0 +1,168 @@\n+angular.module('mean.system')\n+ .factory('friends', ['$http', 'socket', 'Storage', ($http, socket, Storage) => {\n+    class Friends {\n+      /**\n+      * Constructor for this class\n+      */\n+      constructor() {\n+        // user email\n+        this.userEmail = '';\n+        // user name\n+        this.userName = '';\n+        // all registered users\n+        this.registeredUsers = {};\n+        // all my friends\n+        this.userFriends = {};\n+        // all unclicked game invites\n+        this.gameInvites = [];\n+        // Add listener for game_invite socket events\n+        socket.on('game_invite', (message) => {\n+          this.gameInviteRecieved(message);\n+        });\n+        // Add listener for invite_status events\n+        socket.on('invite_status', (message) => {","path":"public/js/services/friends.js","position":23,"original_position":23,"commit_id":"c69eda5402bd8311ddedfa7d50a5d815cc40327b","original_commit_id":"c69eda5402bd8311ddedfa7d50a5d815cc40327b","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'message' is defined but never used            no-unused-vars","created_at":"2016-12-20T22:25:51Z","updated_at":"2016-12-20T22:25:51Z","html_url":"https://github.com/andela/anbu-cfh/pull/38#discussion_r93338807","pull_request_url":"https://api.github.com/repos/andela/anbu-cfh/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/andela/anbu-cfh/pulls/comments/93338807"},"html":{"href":"https://github.com/andela/anbu-cfh/pull/38#discussion_r93338807"},"pull_request":{"href":"https://api.github.com/repos/andela/anbu-cfh/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/andela/anbu-cfh/pulls/38","id":98837347,"html_url":"https://github.com/andela/anbu-cfh/pull/38","diff_url":"https://github.com/andela/anbu-cfh/pull/38.diff","patch_url":"https://github.com/andela/anbu-cfh/pull/38.patch","issue_url":"https://api.github.com/repos/andela/anbu-cfh/issues/38","number":38,"state":"open","locked":false,"title":"#134249299 Add and invite friends to join game","user":{"login":"andela-aolaniran","id":23452705,"avatar_url":"https://avatars.githubusercontent.com/u/23452705?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-aolaniran","html_url":"https://github.com/andela-aolaniran","followers_url":"https://api.github.com/users/andela-aolaniran/followers","following_url":"https://api.github.com/users/andela-aolaniran/following{/other_user}","gists_url":"https://api.github.com/users/andela-aolaniran/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-aolaniran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-aolaniran/subscriptions","organizations_url":"https://api.github.com/users/andela-aolaniran/orgs","repos_url":"https://api.github.com/users/andela-aolaniran/repos","events_url":"https://api.github.com/users/andela-aolaniran/events{/privacy}","received_events_url":"https://api.github.com/users/andela-aolaniran/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nIt implements the feature to allow registered users add other users as friends and also send in-app game invites to their friends.\r\n#### Description of Task to be completed?\r\nRegistered users should be able to invite other users to connect as \"friends\"\r\n#### How should this be manually tested?\r\nN/A\r\n#### Any background context you want to provide?\r\nN/A\r\n#### What are the relevant pivotal tracker stories?\r\n#134249299\r\n#### Screenshots (if appropriate)\r\n![screen shot 2016-12-20 at 11 24 12 pm](https://cloud.githubusercontent.com/assets/23452705/21370341/83e985d4-c70b-11e6-8565-95cd9e7fe510.png)\r\n![screen shot 2016-12-20 at 11 21 56 pm](https://cloud.githubusercontent.com/assets/23452705/21370348/8c802ae0-c70b-11e6-8314-6bd13f66f705.png)\r\n#### Questions:\r\nN/A","created_at":"2016-12-20T22:25:37Z","updated_at":"2016-12-20T22:25:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a4a4eabcc0068abb79643479877ed9d3e2fa6f6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/anbu-cfh/pulls/38/commits","review_comments_url":"https://api.github.com/repos/andela/anbu-cfh/pulls/38/comments","review_comment_url":"https://api.github.com/repos/andela/anbu-cfh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/anbu-cfh/issues/38/comments","statuses_url":"https://api.github.com/repos/andela/anbu-cfh/statuses/c69eda5402bd8311ddedfa7d50a5d815cc40327b","head":{"label":"andela:feature/134249299/invite-friends-to-game","ref":"feature/134249299/invite-friends-to-game","sha":"c69eda5402bd8311ddedfa7d50a5d815cc40327b","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":73683975,"name":"anbu-cfh","full_name":"andela/anbu-cfh","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/anbu-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/anbu-cfh","forks_url":"https://api.github.com/repos/andela/anbu-cfh/forks","keys_url":"https://api.github.com/repos/andela/anbu-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/anbu-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/anbu-cfh/teams","hooks_url":"https://api.github.com/repos/andela/anbu-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/anbu-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/anbu-cfh/events","assignees_url":"https://api.github.com/repos/andela/anbu-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/anbu-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/anbu-cfh/tags","blobs_url":"https://api.github.com/repos/andela/anbu-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/anbu-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/anbu-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/anbu-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/anbu-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/anbu-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/anbu-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/anbu-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/anbu-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/anbu-cfh/subscription","commits_url":"https://api.github.com/repos/andela/anbu-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/anbu-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/anbu-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/anbu-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/anbu-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/anbu-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/anbu-cfh/merges","archive_url":"https://api.github.com/repos/andela/anbu-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/anbu-cfh/downloads","issues_url":"https://api.github.com/repos/andela/anbu-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/anbu-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/anbu-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/anbu-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/anbu-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/anbu-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/anbu-cfh/deployments","created_at":"2016-11-14T08:36:11Z","updated_at":"2016-11-14T09:29:10Z","pushed_at":"2016-12-20T22:25:38Z","git_url":"git://github.com/andela/anbu-cfh.git","ssh_url":"git@github.com:andela/anbu-cfh.git","clone_url":"https://github.com/andela/anbu-cfh.git","svn_url":"https://github.com/andela/anbu-cfh","homepage":null,"size":13019,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"andela:staging","ref":"staging","sha":"35b897679f9fd65fe240c7f2978f2ea1e69ceebb","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":73683975,"name":"anbu-cfh","full_name":"andela/anbu-cfh","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/anbu-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/anbu-cfh","forks_url":"https://api.github.com/repos/andela/anbu-cfh/forks","keys_url":"https://api.github.com/repos/andela/anbu-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/anbu-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/anbu-cfh/teams","hooks_url":"https://api.github.com/repos/andela/anbu-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/anbu-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/anbu-cfh/events","assignees_url":"https://api.github.com/repos/andela/anbu-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/anbu-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/anbu-cfh/tags","blobs_url":"https://api.github.com/repos/andela/anbu-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/anbu-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/anbu-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/anbu-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/anbu-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/anbu-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/anbu-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/anbu-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/anbu-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/anbu-cfh/subscription","commits_url":"https://api.github.com/repos/andela/anbu-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/anbu-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/anbu-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/anbu-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/anbu-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/anbu-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/anbu-cfh/merges","archive_url":"https://api.github.com/repos/andela/anbu-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/anbu-cfh/downloads","issues_url":"https://api.github.com/repos/andela/anbu-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/anbu-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/anbu-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/anbu-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/anbu-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/anbu-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/anbu-cfh/deployments","created_at":"2016-11-14T08:36:11Z","updated_at":"2016-11-14T09:29:10Z","pushed_at":"2016-12-20T22:25:38Z","git_url":"git://github.com/andela/anbu-cfh.git","ssh_url":"git@github.com:andela/anbu-cfh.git","clone_url":"https://github.com/andela/anbu-cfh.git","svn_url":"https://github.com/andela/anbu-cfh","homepage":null,"size":13019,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/anbu-cfh/pulls/38"},"html":{"href":"https://github.com/andela/anbu-cfh/pull/38"},"issue":{"href":"https://api.github.com/repos/andela/anbu-cfh/issues/38"},"comments":{"href":"https://api.github.com/repos/andela/anbu-cfh/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/anbu-cfh/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/anbu-cfh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/anbu-cfh/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/andela/anbu-cfh/statuses/c69eda5402bd8311ddedfa7d50a5d815cc40327b"}}}}
{"actor":{"display_login":"houndci-bot"}}