{"action":"created","comment":{"url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/comments/103191359","pull_request_review_id":23968989,"id":103191359,"diff_hunk":"@@ -55,20 +55,63 @@ angular.module('mean.directives', [])\n     return {\n       restrict: 'EA',\n       templateUrl: '/views/question.html',\n-      link: function (scope, elem, attr) { }\n+      link(scope, elem, attr) { }\n     };\n   })\n   .directive('timer', function () {\n     return {\n       restrict: 'EA',\n       templateUrl: '/views/timer.html',\n-      link: function (scope, elem, attr) { }\n+      link(scope, elem, attr) { }\n+    };\n+  })\n+  .directive('chat', function () {\n+    return {\n+      restrict: 'EA',\n+      templateUrl: '/views/chat.html',\n+      link: function(scope, elem, attr) {\n+        $('#post').on('click', function () {\n+          const database = firebase.database();\n+          const gameID = sessionStorage.getItem('gameID');\n+          const usernameInput = sessionStorage.getItem('Username');\n+          const avatarInput = sessionStorage.getItem('Avatar');\n+          const textInput = document.querySelector('#text');\n+          var msgUser = usernameInput;\n+          var msgAvatar = avatarInput;\n+          var msgText = textInput.value;\n+            // replace myFirebase.set(...); with the next line\n+          database.ref('msg').push({ avatar: msgAvatar, username: msgUser, text: msgText });\n+          textInput.value = '';\n+        });\n+\n+        /** Function to add a data listener **/\n+        var startListening = function () {\n+          firebase.database().ref('msg').on('child_added', function (snapshot) {\n+            var msg = snapshot.val();\n+            var msgAvatarElement = $(\"<img />\");\n+            msgAvatarElement.attr('src', msg.avatar);\n+            var msgUsernameElement = $('<b />');","path":"public/js/directives.js","position":79,"original_position":79,"commit_id":"dfee1fad1b5afa42632384ce7edf424bad104a50","original_commit_id":"dfee1fad1b5afa42632384ce7edf424bad104a50","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":"Strings must use doublequote               quotes","created_at":"2017-02-27T11:59:31Z","updated_at":"2017-02-27T11:59:32Z","html_url":"https://github.com/andela/project-jiayou-cfh/pull/30#discussion_r103191359","pull_request_url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/comments/103191359"},"html":{"href":"https://github.com/andela/project-jiayou-cfh/pull/30#discussion_r103191359"},"pull_request":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30","id":106687070,"html_url":"https://github.com/andela/project-jiayou-cfh/pull/30","diff_url":"https://github.com/andela/project-jiayou-cfh/pull/30.diff","patch_url":"https://github.com/andela/project-jiayou-cfh/pull/30.patch","issue_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/30","number":30,"state":"open","locked":false,"title":"#137138341-Feature/Add Emojis To Chat ","user":{"login":"andela-anwosu","id":24938070,"avatar_url":"https://avatars.githubusercontent.com/u/24938070?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-anwosu","html_url":"https://github.com/andela-anwosu","followers_url":"https://api.github.com/users/andela-anwosu/followers","following_url":"https://api.github.com/users/andela-anwosu/following{/other_user}","gists_url":"https://api.github.com/users/andela-anwosu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-anwosu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-anwosu/subscriptions","organizations_url":"https://api.github.com/users/andela-anwosu/orgs","repos_url":"https://api.github.com/users/andela-anwosu/repos","events_url":"https://api.github.com/users/andela-anwosu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-anwosu/received_events","type":"User","site_admin":false},"body":"**What does this PR do?**\r\n\r\nThis PR adds a feature to the chat message-box, supporting emojis and unicode characters.\r\n\r\n**Description of Task to be completed?**\r\n\r\nAs a user in a game I want to be able to use emojis in the group chat so that I have a more enjoyable and expressive chat experience\r\n\r\n**How should this be manually tested?**\r\n\r\nLaunch the Cards For Humanity project locally or on Heroku and navigate to the sign-in/sign-up screen. The pictures for the new sign-in and sign-up screen is attached in the screenshots below.\r\n\r\n**What are the relevant pivotal tracker stories?**\r\n\r\nUsers should be able to use emojis in the chat window\r\n","created_at":"2017-02-17T08:23:53Z","updated_at":"2017-02-27T11:59:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30/commits","review_comments_url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30/comments","review_comment_url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/30/comments","statuses_url":"https://api.github.com/repos/andela/project-jiayou-cfh/statuses/dfee1fad1b5afa42632384ce7edf424bad104a50","head":{"label":"andela:feature/add-emojis-to-chat-137138347","ref":"feature/add-emojis-to-chat-137138347","sha":"dfee1fad1b5afa42632384ce7edf424bad104a50","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":78124763,"name":"project-jiayou-cfh","full_name":"andela/project-jiayou-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/project-jiayou-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/project-jiayou-cfh","forks_url":"https://api.github.com/repos/andela/project-jiayou-cfh/forks","keys_url":"https://api.github.com/repos/andela/project-jiayou-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/project-jiayou-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/project-jiayou-cfh/teams","hooks_url":"https://api.github.com/repos/andela/project-jiayou-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/project-jiayou-cfh/events","assignees_url":"https://api.github.com/repos/andela/project-jiayou-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/project-jiayou-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/project-jiayou-cfh/tags","blobs_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/project-jiayou-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/project-jiayou-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/project-jiayou-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/project-jiayou-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/project-jiayou-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/project-jiayou-cfh/subscription","commits_url":"https://api.github.com/repos/andela/project-jiayou-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/project-jiayou-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/project-jiayou-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/project-jiayou-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/project-jiayou-cfh/merges","archive_url":"https://api.github.com/repos/andela/project-jiayou-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/project-jiayou-cfh/downloads","issues_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/project-jiayou-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/project-jiayou-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/project-jiayou-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/project-jiayou-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/project-jiayou-cfh/deployments","created_at":"2017-01-05T15:30:33Z","updated_at":"2017-02-13T15:49:36Z","pushed_at":"2017-02-27T11:58:39Z","git_url":"git://github.com/andela/project-jiayou-cfh.git","ssh_url":"git@github.com:andela/project-jiayou-cfh.git","clone_url":"https://github.com/andela/project-jiayou-cfh.git","svn_url":"https://github.com/andela/project-jiayou-cfh","homepage":null,"size":18032,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":0,"default_branch":"development"}},"base":{"label":"andela:development","ref":"development","sha":"121a303cc85399b5690202bf67db94fbdbeb8e7d","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":78124763,"name":"project-jiayou-cfh","full_name":"andela/project-jiayou-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/project-jiayou-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/project-jiayou-cfh","forks_url":"https://api.github.com/repos/andela/project-jiayou-cfh/forks","keys_url":"https://api.github.com/repos/andela/project-jiayou-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/project-jiayou-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/project-jiayou-cfh/teams","hooks_url":"https://api.github.com/repos/andela/project-jiayou-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/project-jiayou-cfh/events","assignees_url":"https://api.github.com/repos/andela/project-jiayou-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/project-jiayou-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/project-jiayou-cfh/tags","blobs_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/project-jiayou-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/project-jiayou-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/project-jiayou-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/project-jiayou-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/project-jiayou-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/project-jiayou-cfh/subscription","commits_url":"https://api.github.com/repos/andela/project-jiayou-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/project-jiayou-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/project-jiayou-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/project-jiayou-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/project-jiayou-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/project-jiayou-cfh/merges","archive_url":"https://api.github.com/repos/andela/project-jiayou-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/project-jiayou-cfh/downloads","issues_url":"https://api.github.com/repos/andela/project-jiayou-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/project-jiayou-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/project-jiayou-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/project-jiayou-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/project-jiayou-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/project-jiayou-cfh/deployments","created_at":"2017-01-05T15:30:33Z","updated_at":"2017-02-13T15:49:36Z","pushed_at":"2017-02-27T11:58:39Z","git_url":"git://github.com/andela/project-jiayou-cfh.git","ssh_url":"git@github.com:andela/project-jiayou-cfh.git","clone_url":"https://github.com/andela/project-jiayou-cfh.git","svn_url":"https://github.com/andela/project-jiayou-cfh","homepage":null,"size":18032,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30"},"html":{"href":"https://github.com/andela/project-jiayou-cfh/pull/30"},"issue":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/30"},"comments":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/andela/project-jiayou-cfh/statuses/dfee1fad1b5afa42632384ce7edf424bad104a50"}}}}
{"actor":{"display_login":"houndci-bot"}}