{"action":"created","comment":{"url":"https://api.github.com/repos/hoppula/refire-forum/pulls/comments/86630830","pull_request_review_id":7283204,"id":86630830,"diff_hunk":"@@ -113,6 +117,13 @@ const Post = ({\n                 onClick={() => updateQuote(\"\", postKey)}\n                 styles={theme.ReplyButton}\n               />\n+              <UpvoteButton\n+                user={user}\n+                upvotes={Object.keys(post.likes || {}).length || 0}\n+                liked = {Object.keys(post.likes || {}).includes(uid || {}) && post.likes[uid] === true}","path":"src/Thread/Post.js","position":32,"original_position":32,"commit_id":"90ebca153e7ceeac2a490ae1c43eac461b38a40e","original_commit_id":"90ebca153e7ceeac2a490ae1c43eac461b38a40e","user":{"login":"hoppula","id":1070425,"avatar_url":"https://avatars.githubusercontent.com/u/1070425?v=3","gravatar_id":"","url":"https://api.github.com/users/hoppula","html_url":"https://github.com/hoppula","followers_url":"https://api.github.com/users/hoppula/followers","following_url":"https://api.github.com/users/hoppula/following{/other_user}","gists_url":"https://api.github.com/users/hoppula/gists{/gist_id}","starred_url":"https://api.github.com/users/hoppula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoppula/subscriptions","organizations_url":"https://api.github.com/users/hoppula/orgs","repos_url":"https://api.github.com/users/hoppula/repos","events_url":"https://api.github.com/users/hoppula/events{/privacy}","received_events_url":"https://api.github.com/users/hoppula/received_events","type":"User","site_admin":false},"body":"This could use [lodash's includes()](https://lodash.com/docs/3.10.1#includes) instead of native ES6 .includes() for IE 11 support.","created_at":"2016-11-04T20:56:15Z","updated_at":"2016-11-04T20:56:15Z","html_url":"https://github.com/hoppula/refire-forum/pull/8#discussion_r86630830","pull_request_url":"https://api.github.com/repos/hoppula/refire-forum/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/hoppula/refire-forum/pulls/comments/86630830"},"html":{"href":"https://github.com/hoppula/refire-forum/pull/8#discussion_r86630830"},"pull_request":{"href":"https://api.github.com/repos/hoppula/refire-forum/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/hoppula/refire-forum/pulls/8","id":92190344,"html_url":"https://github.com/hoppula/refire-forum/pull/8","diff_url":"https://github.com/hoppula/refire-forum/pull/8.diff","patch_url":"https://github.com/hoppula/refire-forum/pull/8.patch","issue_url":"https://api.github.com/repos/hoppula/refire-forum/issues/8","number":8,"state":"open","locked":false,"title":"Added like button for posts","user":{"login":"dominictracey","id":5113339,"avatar_url":"https://avatars.githubusercontent.com/u/5113339?v=3","gravatar_id":"","url":"https://api.github.com/users/dominictracey","html_url":"https://github.com/dominictracey","followers_url":"https://api.github.com/users/dominictracey/followers","following_url":"https://api.github.com/users/dominictracey/following{/other_user}","gists_url":"https://api.github.com/users/dominictracey/gists{/gist_id}","starred_url":"https://api.github.com/users/dominictracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominictracey/subscriptions","organizations_url":"https://api.github.com/users/dominictracey/orgs","repos_url":"https://api.github.com/users/dominictracey/repos","events_url":"https://api.github.com/users/dominictracey/events{/privacy}","received_events_url":"https://api.github.com/users/dominictracey/received_events","type":"User","site_admin":false},"body":"This adds a like button to posts with toggling behavior that keeps a two-way association between post and user.\r\n\r\nI'm creating this PR because there may be an issue in refire or refire-app that it repros. You need to re-run the security-rules.json to try it. I'm new enough to redux that I may be doing something incorrectly.\r\n\r\nIssue discussion:\r\nThe like button works as expected when clicking it on. When you click it off, however, the firebase paths are properly set to null and the keys dropped, but the redux store doesn't seem to get updated: the post object in the threadPosts binding still has the current user's key in it's likes subpath (even though it is gone from firebase). ","created_at":"2016-11-03T16:28:08Z","updated_at":"2016-11-04T20:56:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63ac13db5b0c23cdfabd36975b51f3d2a0161cf7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hoppula/refire-forum/pulls/8/commits","review_comments_url":"https://api.github.com/repos/hoppula/refire-forum/pulls/8/comments","review_comment_url":"https://api.github.com/repos/hoppula/refire-forum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hoppula/refire-forum/issues/8/comments","statuses_url":"https://api.github.com/repos/hoppula/refire-forum/statuses/90ebca153e7ceeac2a490ae1c43eac461b38a40e","head":{"label":"dominictracey:master","ref":"master","sha":"90ebca153e7ceeac2a490ae1c43eac461b38a40e","user":{"login":"dominictracey","id":5113339,"avatar_url":"https://avatars.githubusercontent.com/u/5113339?v=3","gravatar_id":"","url":"https://api.github.com/users/dominictracey","html_url":"https://github.com/dominictracey","followers_url":"https://api.github.com/users/dominictracey/followers","following_url":"https://api.github.com/users/dominictracey/following{/other_user}","gists_url":"https://api.github.com/users/dominictracey/gists{/gist_id}","starred_url":"https://api.github.com/users/dominictracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominictracey/subscriptions","organizations_url":"https://api.github.com/users/dominictracey/orgs","repos_url":"https://api.github.com/users/dominictracey/repos","events_url":"https://api.github.com/users/dominictracey/events{/privacy}","received_events_url":"https://api.github.com/users/dominictracey/received_events","type":"User","site_admin":false},"repo":{"id":72057553,"name":"refire-forum","full_name":"dominictracey/refire-forum","owner":{"login":"dominictracey","id":5113339,"avatar_url":"https://avatars.githubusercontent.com/u/5113339?v=3","gravatar_id":"","url":"https://api.github.com/users/dominictracey","html_url":"https://github.com/dominictracey","followers_url":"https://api.github.com/users/dominictracey/followers","following_url":"https://api.github.com/users/dominictracey/following{/other_user}","gists_url":"https://api.github.com/users/dominictracey/gists{/gist_id}","starred_url":"https://api.github.com/users/dominictracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominictracey/subscriptions","organizations_url":"https://api.github.com/users/dominictracey/orgs","repos_url":"https://api.github.com/users/dominictracey/repos","events_url":"https://api.github.com/users/dominictracey/events{/privacy}","received_events_url":"https://api.github.com/users/dominictracey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dominictracey/refire-forum","description":"Serverless discussion forum built with React, Redux and Firebase","fork":true,"url":"https://api.github.com/repos/dominictracey/refire-forum","forks_url":"https://api.github.com/repos/dominictracey/refire-forum/forks","keys_url":"https://api.github.com/repos/dominictracey/refire-forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dominictracey/refire-forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dominictracey/refire-forum/teams","hooks_url":"https://api.github.com/repos/dominictracey/refire-forum/hooks","issue_events_url":"https://api.github.com/repos/dominictracey/refire-forum/issues/events{/number}","events_url":"https://api.github.com/repos/dominictracey/refire-forum/events","assignees_url":"https://api.github.com/repos/dominictracey/refire-forum/assignees{/user}","branches_url":"https://api.github.com/repos/dominictracey/refire-forum/branches{/branch}","tags_url":"https://api.github.com/repos/dominictracey/refire-forum/tags","blobs_url":"https://api.github.com/repos/dominictracey/refire-forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dominictracey/refire-forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dominictracey/refire-forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/dominictracey/refire-forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dominictracey/refire-forum/statuses/{sha}","languages_url":"https://api.github.com/repos/dominictracey/refire-forum/languages","stargazers_url":"https://api.github.com/repos/dominictracey/refire-forum/stargazers","contributors_url":"https://api.github.com/repos/dominictracey/refire-forum/contributors","subscribers_url":"https://api.github.com/repos/dominictracey/refire-forum/subscribers","subscription_url":"https://api.github.com/repos/dominictracey/refire-forum/subscription","commits_url":"https://api.github.com/repos/dominictracey/refire-forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/dominictracey/refire-forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/dominictracey/refire-forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/dominictracey/refire-forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/dominictracey/refire-forum/contents/{+path}","compare_url":"https://api.github.com/repos/dominictracey/refire-forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dominictracey/refire-forum/merges","archive_url":"https://api.github.com/repos/dominictracey/refire-forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dominictracey/refire-forum/downloads","issues_url":"https://api.github.com/repos/dominictracey/refire-forum/issues{/number}","pulls_url":"https://api.github.com/repos/dominictracey/refire-forum/pulls{/number}","milestones_url":"https://api.github.com/repos/dominictracey/refire-forum/milestones{/number}","notifications_url":"https://api.github.com/repos/dominictracey/refire-forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dominictracey/refire-forum/labels{/name}","releases_url":"https://api.github.com/repos/dominictracey/refire-forum/releases{/id}","deployments_url":"https://api.github.com/repos/dominictracey/refire-forum/deployments","created_at":"2016-10-27T00:54:37Z","updated_at":"2016-10-27T00:54:38Z","pushed_at":"2016-11-03T16:12:53Z","git_url":"git://github.com/dominictracey/refire-forum.git","ssh_url":"git@github.com:dominictracey/refire-forum.git","clone_url":"https://github.com/dominictracey/refire-forum.git","svn_url":"https://github.com/dominictracey/refire-forum","homepage":null,"size":95,"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":"master"}},"base":{"label":"hoppula:master","ref":"master","sha":"6a3a43ebcde5906dee1789e0a6eb61f9011d53a7","user":{"login":"hoppula","id":1070425,"avatar_url":"https://avatars.githubusercontent.com/u/1070425?v=3","gravatar_id":"","url":"https://api.github.com/users/hoppula","html_url":"https://github.com/hoppula","followers_url":"https://api.github.com/users/hoppula/followers","following_url":"https://api.github.com/users/hoppula/following{/other_user}","gists_url":"https://api.github.com/users/hoppula/gists{/gist_id}","starred_url":"https://api.github.com/users/hoppula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoppula/subscriptions","organizations_url":"https://api.github.com/users/hoppula/orgs","repos_url":"https://api.github.com/users/hoppula/repos","events_url":"https://api.github.com/users/hoppula/events{/privacy}","received_events_url":"https://api.github.com/users/hoppula/received_events","type":"User","site_admin":false},"repo":{"id":53423804,"name":"refire-forum","full_name":"hoppula/refire-forum","owner":{"login":"hoppula","id":1070425,"avatar_url":"https://avatars.githubusercontent.com/u/1070425?v=3","gravatar_id":"","url":"https://api.github.com/users/hoppula","html_url":"https://github.com/hoppula","followers_url":"https://api.github.com/users/hoppula/followers","following_url":"https://api.github.com/users/hoppula/following{/other_user}","gists_url":"https://api.github.com/users/hoppula/gists{/gist_id}","starred_url":"https://api.github.com/users/hoppula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoppula/subscriptions","organizations_url":"https://api.github.com/users/hoppula/orgs","repos_url":"https://api.github.com/users/hoppula/repos","events_url":"https://api.github.com/users/hoppula/events{/privacy}","received_events_url":"https://api.github.com/users/hoppula/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hoppula/refire-forum","description":"Serverless discussion forum built with React, Redux and Firebase","fork":false,"url":"https://api.github.com/repos/hoppula/refire-forum","forks_url":"https://api.github.com/repos/hoppula/refire-forum/forks","keys_url":"https://api.github.com/repos/hoppula/refire-forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoppula/refire-forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoppula/refire-forum/teams","hooks_url":"https://api.github.com/repos/hoppula/refire-forum/hooks","issue_events_url":"https://api.github.com/repos/hoppula/refire-forum/issues/events{/number}","events_url":"https://api.github.com/repos/hoppula/refire-forum/events","assignees_url":"https://api.github.com/repos/hoppula/refire-forum/assignees{/user}","branches_url":"https://api.github.com/repos/hoppula/refire-forum/branches{/branch}","tags_url":"https://api.github.com/repos/hoppula/refire-forum/tags","blobs_url":"https://api.github.com/repos/hoppula/refire-forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoppula/refire-forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoppula/refire-forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoppula/refire-forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoppula/refire-forum/statuses/{sha}","languages_url":"https://api.github.com/repos/hoppula/refire-forum/languages","stargazers_url":"https://api.github.com/repos/hoppula/refire-forum/stargazers","contributors_url":"https://api.github.com/repos/hoppula/refire-forum/contributors","subscribers_url":"https://api.github.com/repos/hoppula/refire-forum/subscribers","subscription_url":"https://api.github.com/repos/hoppula/refire-forum/subscription","commits_url":"https://api.github.com/repos/hoppula/refire-forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoppula/refire-forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoppula/refire-forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoppula/refire-forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoppula/refire-forum/contents/{+path}","compare_url":"https://api.github.com/repos/hoppula/refire-forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoppula/refire-forum/merges","archive_url":"https://api.github.com/repos/hoppula/refire-forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoppula/refire-forum/downloads","issues_url":"https://api.github.com/repos/hoppula/refire-forum/issues{/number}","pulls_url":"https://api.github.com/repos/hoppula/refire-forum/pulls{/number}","milestones_url":"https://api.github.com/repos/hoppula/refire-forum/milestones{/number}","notifications_url":"https://api.github.com/repos/hoppula/refire-forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoppula/refire-forum/labels{/name}","releases_url":"https://api.github.com/repos/hoppula/refire-forum/releases{/id}","deployments_url":"https://api.github.com/repos/hoppula/refire-forum/deployments","created_at":"2016-03-08T15:39:06Z","updated_at":"2016-11-03T23:21:11Z","pushed_at":"2016-11-03T16:28:08Z","git_url":"git://github.com/hoppula/refire-forum.git","ssh_url":"git@github.com:hoppula/refire-forum.git","clone_url":"https://github.com/hoppula/refire-forum.git","svn_url":"https://github.com/hoppula/refire-forum","homepage":null,"size":94,"stargazers_count":61,"watchers_count":61,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":1,"forks":15,"open_issues":1,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hoppula/refire-forum/pulls/8"},"html":{"href":"https://github.com/hoppula/refire-forum/pull/8"},"issue":{"href":"https://api.github.com/repos/hoppula/refire-forum/issues/8"},"comments":{"href":"https://api.github.com/repos/hoppula/refire-forum/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/hoppula/refire-forum/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/hoppula/refire-forum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hoppula/refire-forum/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/hoppula/refire-forum/statuses/90ebca153e7ceeac2a490ae1c43eac461b38a40e"}}}}
{"actor":{"display_login":"hoppula"}}