payload: {"action":"created","comment":{"url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/comments/279143079","pull_request_review_id":231408413,"id":279143079,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3OTE0MzA3OQ==","diff_hunk":"@@ -0,0 +1,76 @@\n+import React, { Component } from \"react\";\n+import \"./MessageManager.css\";\n+import MessagingWindow from \"../MessagingWindow/MessagingWindow\";\n+\n+import Firebase from \"firebase\";\n+\n+class MessageManager extends Component {\n+  constructor(props) {\n+    super(props);\n+\n+    this.state = {\n+      friends: [],\n+      friendClicked: {},\n+      user: this.props.user\n+    };\n+  }\n+\n+  componentDidMount() {\n+    this.friendsRef = Firebase.database().ref(\n+      \"users/\" + this.props.user + \"/friends/\"\n+    ); //reference to friends\n+    this.friendsRef.on(\"value\", snapshot => {\n+      this.setState(\n+        {\n+          friends: snapshot.val() //gives complete list of friends\n+        },\n+        () => {\n+          let newClickedList = {};\n+          Object.keys(this.state.friends).map(\n+            (f, i) => (newClickedList[f] = false)\n+          );\n+          this.setState({\n+            friendClicked: newClickedList\n+          });\n+        }\n+      );\n+    });\n+  }\n+\n+  handleFriendClick = f => {\n+    let prevFriendClicked = this.state.friendClicked;\n+    prevFriendClicked[f] = !this.state.friendClicked[f];\n+    this.setState({ friendClicked: prevFriendClicked });\n+  };\n+\n+  render() {\n+    return (\n+      <div>\n+        <h1>Temporary Message Manager</h1>\n+\n+        {/* TODO: Display list of friends */}\n+        {console.log(this.state)}\n+        {Object.keys(this.state.friends).map((f, i) => (\n+          <div key={i}>\n+            <button\n+              className=\"friend-name\"\n+              onClick={() => this.handleFriendClick(f)}\n+            >\n+              {\" \"}\n+              Friend {f}{\" \"}\n+            </button>\n+            <div\n+              style={{\n+                display: +this.state.friendClicked[f] ? \"inline\" : \"none\"","path":"src/components/MessageManager/MessageManager.jsx","position":64,"original_position":64,"commit_id":"4be953ba1de0caf9037976802d9298b8c9dd7483","original_commit_id":"4be953ba1de0caf9037976802d9298b8c9dd7483","user":{"login":"alexanderqchen","id":12878275,"node_id":"MDQ6VXNlcjEyODc4Mjc1","avatar_url":"https://avatars3.githubusercontent.com/u/12878275?v=4","gravatar_id":"","url":"https://api.github.com/users/alexanderqchen","html_url":"https://github.com/alexanderqchen","followers_url":"https://api.github.com/users/alexanderqchen/followers","following_url":"https://api.github.com/users/alexanderqchen/following{/other_user}","gists_url":"https://api.github.com/users/alexanderqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderqchen/subscriptions","organizations_url":"https://api.github.com/users/alexanderqchen/orgs","repos_url":"https://api.github.com/users/alexanderqchen/repos","events_url":"https://api.github.com/users/alexanderqchen/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderqchen/received_events","type":"User","site_admin":false},"body":"what's the plus sign for?","created_at":"2019-04-27T04:39:24Z","updated_at":"2019-04-27T04:41:17Z","html_url":"https://github.com/UCLA-Creative-Labs/flux/pull/12#discussion_r279143079","pull_request_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/comments/279143079"},"html":{"href":"https://github.com/UCLA-Creative-Labs/flux/pull/12#discussion_r279143079"},"pull_request":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12","id":274080475,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc0MDgwNDc1","html_url":"https://github.com/UCLA-Creative-Labs/flux/pull/12","diff_url":"https://github.com/UCLA-Creative-Labs/flux/pull/12.diff","patch_url":"https://github.com/UCLA-Creative-Labs/flux/pull/12.patch","issue_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/12","number":12,"state":"open","locked":false,"title":"Implemented Message Manager (Fixed #9)","user":{"login":"nikilrselvam","id":45131126,"node_id":"MDQ6VXNlcjQ1MTMxMTI2","avatar_url":"https://avatars3.githubusercontent.com/u/45131126?v=4","gravatar_id":"","url":"https://api.github.com/users/nikilrselvam","html_url":"https://github.com/nikilrselvam","followers_url":"https://api.github.com/users/nikilrselvam/followers","following_url":"https://api.github.com/users/nikilrselvam/following{/other_user}","gists_url":"https://api.github.com/users/nikilrselvam/gists{/gist_id}","starred_url":"https://api.github.com/users/nikilrselvam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikilrselvam/subscriptions","organizations_url":"https://api.github.com/users/nikilrselvam/orgs","repos_url":"https://api.github.com/users/nikilrselvam/repos","events_url":"https://api.github.com/users/nikilrselvam/events{/privacy}","received_events_url":"https://api.github.com/users/nikilrselvam/received_events","type":"User","site_admin":false},"body":"Fixes #9 . The MessageManager Component takes in one prop: the current user's id. The Component then maintains a list of all of the user's friends in its state, which it initially obtains from Firebase. \r\n\r\nFor each friend in the list, it renders a button with the friend's id. This button when clicked, opens up the relevant MessagingWindow component. The component is hidden once the user clicks on the button again.\r\n\r\nNo major styling has been done yet!","created_at":"2019-04-27T03:57:03Z","updated_at":"2019-04-27T04:41:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4514c0950c607725854cf2e654e0531aa8d1a6b8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12/commits","review_comments_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12/comments","review_comment_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/12/comments","statuses_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/statuses/4be953ba1de0caf9037976802d9298b8c9dd7483","head":{"label":"UCLA-Creative-Labs:Nikil/message-manager","ref":"Nikil/message-manager","sha":"4be953ba1de0caf9037976802d9298b8c9dd7483","user":{"login":"UCLA-Creative-Labs","id":36466569,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDY2NTY5","avatar_url":"https://avatars3.githubusercontent.com/u/36466569?v=4","gravatar_id":"","url":"https://api.github.com/users/UCLA-Creative-Labs","html_url":"https://github.com/UCLA-Creative-Labs","followers_url":"https://api.github.com/users/UCLA-Creative-Labs/followers","following_url":"https://api.github.com/users/UCLA-Creative-Labs/following{/other_user}","gists_url":"https://api.github.com/users/UCLA-Creative-Labs/gists{/gist_id}","starred_url":"https://api.github.com/users/UCLA-Creative-Labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCLA-Creative-Labs/subscriptions","organizations_url":"https://api.github.com/users/UCLA-Creative-Labs/orgs","repos_url":"https://api.github.com/users/UCLA-Creative-Labs/repos","events_url":"https://api.github.com/users/UCLA-Creative-Labs/events{/privacy}","received_events_url":"https://api.github.com/users/UCLA-Creative-Labs/received_events","type":"Organization","site_admin":false},"repo":{"id":182339612,"node_id":"MDEwOlJlcG9zaXRvcnkxODIzMzk2MTI=","name":"flux","full_name":"UCLA-Creative-Labs/flux","private":false,"owner":{"login":"UCLA-Creative-Labs","id":36466569,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDY2NTY5","avatar_url":"https://avatars3.githubusercontent.com/u/36466569?v=4","gravatar_id":"","url":"https://api.github.com/users/UCLA-Creative-Labs","html_url":"https://github.com/UCLA-Creative-Labs","followers_url":"https://api.github.com/users/UCLA-Creative-Labs/followers","following_url":"https://api.github.com/users/UCLA-Creative-Labs/following{/other_user}","gists_url":"https://api.github.com/users/UCLA-Creative-Labs/gists{/gist_id}","starred_url":"https://api.github.com/users/UCLA-Creative-Labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCLA-Creative-Labs/subscriptions","organizations_url":"https://api.github.com/users/UCLA-Creative-Labs/orgs","repos_url":"https://api.github.com/users/UCLA-Creative-Labs/repos","events_url":"https://api.github.com/users/UCLA-Creative-Labs/events{/privacy}","received_events_url":"https://api.github.com/users/UCLA-Creative-Labs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/UCLA-Creative-Labs/flux","description":null,"fork":false,"url":"https://api.github.com/repos/UCLA-Creative-Labs/flux","forks_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/forks","keys_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/teams","hooks_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/hooks","issue_events_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/events{/number}","events_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/events","assignees_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/assignees{/user}","branches_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/branches{/branch}","tags_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/tags","blobs_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/refs{/sha}","trees_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/statuses/{sha}","languages_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/languages","stargazers_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/stargazers","contributors_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/contributors","subscribers_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/subscribers","subscription_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/subscription","commits_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/commits{/sha}","git_commits_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/commits{/sha}","comments_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/comments{/number}","issue_comment_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/comments{/number}","contents_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/contents/{+path}","compare_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/merges","archive_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/downloads","issues_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues{/number}","pulls_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls{/number}","milestones_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/milestones{/number}","notifications_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/labels{/name}","releases_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/releases{/id}","deployments_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/deployments","created_at":"2019-04-20T00:07:19Z","updated_at":"2019-04-27T02:04:52Z","pushed_at":"2019-04-27T03:57:03Z","git_url":"git://github.com/UCLA-Creative-Labs/flux.git","ssh_url":"git@github.com:UCLA-Creative-Labs/flux.git","clone_url":"https://github.com/UCLA-Creative-Labs/flux.git","svn_url":"https://github.com/UCLA-Creative-Labs/flux","homepage":null,"size":577,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":4,"default_branch":"master"}},"base":{"label":"UCLA-Creative-Labs:master","ref":"master","sha":"f362af56e428606688f250c833d7ae4e8e40feb6","user":{"login":"UCLA-Creative-Labs","id":36466569,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDY2NTY5","avatar_url":"https://avatars3.githubusercontent.com/u/36466569?v=4","gravatar_id":"","url":"https://api.github.com/users/UCLA-Creative-Labs","html_url":"https://github.com/UCLA-Creative-Labs","followers_url":"https://api.github.com/users/UCLA-Creative-Labs/followers","following_url":"https://api.github.com/users/UCLA-Creative-Labs/following{/other_user}","gists_url":"https://api.github.com/users/UCLA-Creative-Labs/gists{/gist_id}","starred_url":"https://api.github.com/users/UCLA-Creative-Labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCLA-Creative-Labs/subscriptions","organizations_url":"https://api.github.com/users/UCLA-Creative-Labs/orgs","repos_url":"https://api.github.com/users/UCLA-Creative-Labs/repos","events_url":"https://api.github.com/users/UCLA-Creative-Labs/events{/privacy}","received_events_url":"https://api.github.com/users/UCLA-Creative-Labs/received_events","type":"Organization","site_admin":false},"repo":{"id":182339612,"node_id":"MDEwOlJlcG9zaXRvcnkxODIzMzk2MTI=","name":"flux","full_name":"UCLA-Creative-Labs/flux","private":false,"owner":{"login":"UCLA-Creative-Labs","id":36466569,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDY2NTY5","avatar_url":"https://avatars3.githubusercontent.com/u/36466569?v=4","gravatar_id":"","url":"https://api.github.com/users/UCLA-Creative-Labs","html_url":"https://github.com/UCLA-Creative-Labs","followers_url":"https://api.github.com/users/UCLA-Creative-Labs/followers","following_url":"https://api.github.com/users/UCLA-Creative-Labs/following{/other_user}","gists_url":"https://api.github.com/users/UCLA-Creative-Labs/gists{/gist_id}","starred_url":"https://api.github.com/users/UCLA-Creative-Labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCLA-Creative-Labs/subscriptions","organizations_url":"https://api.github.com/users/UCLA-Creative-Labs/orgs","repos_url":"https://api.github.com/users/UCLA-Creative-Labs/repos","events_url":"https://api.github.com/users/UCLA-Creative-Labs/events{/privacy}","received_events_url":"https://api.github.com/users/UCLA-Creative-Labs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/UCLA-Creative-Labs/flux","description":null,"fork":false,"url":"https://api.github.com/repos/UCLA-Creative-Labs/flux","forks_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/forks","keys_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/teams","hooks_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/hooks","issue_events_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/events{/number}","events_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/events","assignees_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/assignees{/user}","branches_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/branches{/branch}","tags_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/tags","blobs_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/refs{/sha}","trees_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/statuses/{sha}","languages_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/languages","stargazers_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/stargazers","contributors_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/contributors","subscribers_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/subscribers","subscription_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/subscription","commits_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/commits{/sha}","git_commits_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/git/commits{/sha}","comments_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/comments{/number}","issue_comment_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/comments{/number}","contents_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/contents/{+path}","compare_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/merges","archive_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/downloads","issues_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues{/number}","pulls_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls{/number}","milestones_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/milestones{/number}","notifications_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/labels{/name}","releases_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/releases{/id}","deployments_url":"https://api.github.com/repos/UCLA-Creative-Labs/flux/deployments","created_at":"2019-04-20T00:07:19Z","updated_at":"2019-04-27T02:04:52Z","pushed_at":"2019-04-27T03:57:03Z","git_url":"git://github.com/UCLA-Creative-Labs/flux.git","ssh_url":"git@github.com:UCLA-Creative-Labs/flux.git","clone_url":"https://github.com/UCLA-Creative-Labs/flux.git","svn_url":"https://github.com/UCLA-Creative-Labs/flux","homepage":null,"size":577,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12"},"html":{"href":"https://github.com/UCLA-Creative-Labs/flux/pull/12"},"issue":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/12"},"comments":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/UCLA-Creative-Labs/flux/statuses/4be953ba1de0caf9037976802d9298b8c9dd7483"}},"author_association":"COLLABORATOR"}}
other: {"actor":{"display_login":"alexanderqchen"}}