{"action":"created","comment":{"url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/comments/179641670","pull_request_review_id":109925919,"id":179641670,"diff_hunk":"@@ -35,8 +36,18 @@ public void doGet(HttpServletRequest request, HttpServletResponse response)\n       request.getRequestDispatcher(\"/WEB-INF/view/profile.jsp\").forward(request, response);\n       return;\n     }\n+    List<Message> authorMessages = new ArrayList<>();\n+    for (UUID conversationId : user.getConversationIds()){\n+      List<Message> messages = messageStore.getMessagesInConversation(conversationId);\n+      for(Message message: messages){\n+        if(message.getAuthorId().equals(user.getId())){\n+          authorMessages.add(message);\n+        }\n+      }\n+    }","path":"src/main/java/codeu/controller/ProfileServlet.java","position":20,"original_position":20,"commit_id":"9bcc9f51eda2c7d4b74b8537921fd719e27a806c","original_commit_id":"9bcc9f51eda2c7d4b74b8537921fd719e27a806c","user":{"login":"JorgeSabella","id":21691148,"avatar_url":"https://avatars2.githubusercontent.com/u/21691148?v=4","gravatar_id":"","url":"https://api.github.com/users/JorgeSabella","html_url":"https://github.com/JorgeSabella","followers_url":"https://api.github.com/users/JorgeSabella/followers","following_url":"https://api.github.com/users/JorgeSabella/following{/other_user}","gists_url":"https://api.github.com/users/JorgeSabella/gists{/gist_id}","starred_url":"https://api.github.com/users/JorgeSabella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JorgeSabella/subscriptions","organizations_url":"https://api.github.com/users/JorgeSabella/orgs","repos_url":"https://api.github.com/users/JorgeSabella/repos","events_url":"https://api.github.com/users/JorgeSabella/events{/privacy}","received_events_url":"https://api.github.com/users/JorgeSabella/received_events","type":"User","site_admin":false},"body":"This algorithm works but I think that if we have a ton of messages it may be inefficient.","created_at":"2018-04-06T01:32:34Z","updated_at":"2018-04-06T01:32:49Z","html_url":"https://github.com/maksymko/CodeU-Spring-2018/pull/50#discussion_r179641670","pull_request_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/comments/179641670"},"html":{"href":"https://github.com/maksymko/CodeU-Spring-2018/pull/50#discussion_r179641670"},"pull_request":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50","id":179507859,"html_url":"https://github.com/maksymko/CodeU-Spring-2018/pull/50","diff_url":"https://github.com/maksymko/CodeU-Spring-2018/pull/50.diff","patch_url":"https://github.com/maksymko/CodeU-Spring-2018/pull/50.patch","issue_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/50","number":50,"state":"open","locked":false,"title":" Modified ProfileServlet to show messages on profile page","user":{"login":"yxzhu16","id":36939877,"avatar_url":"https://avatars0.githubusercontent.com/u/36939877?v=4","gravatar_id":"","url":"https://api.github.com/users/yxzhu16","html_url":"https://github.com/yxzhu16","followers_url":"https://api.github.com/users/yxzhu16/followers","following_url":"https://api.github.com/users/yxzhu16/following{/other_user}","gists_url":"https://api.github.com/users/yxzhu16/gists{/gist_id}","starred_url":"https://api.github.com/users/yxzhu16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yxzhu16/subscriptions","organizations_url":"https://api.github.com/users/yxzhu16/orgs","repos_url":"https://api.github.com/users/yxzhu16/repos","events_url":"https://api.github.com/users/yxzhu16/events{/privacy}","received_events_url":"https://api.github.com/users/yxzhu16/received_events","type":"User","site_admin":false},"body":"Added conversationIds field to User class to save the conversation ids that the user is in.\r\nModified ProfileServlet and profile.jsp to handle individual messages shown on profile page.\r\nCurrent Algorithm: For each conversationId, get a list of messages from messageStore and filter those written by the user.\r\nWhen a user tries to add a message to a conversation where he never sent messages, add the corresponding conversationId to user.\r\nModified ServerStartupListener to add previous conversationIds to users in the beginning.","created_at":"2018-04-04T20:46:40Z","updated_at":"2018-04-06T01:32:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd7c7918b905e264f90f2d0d2c017006d4d42025","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50/commits","review_comments_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50/comments","review_comment_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/50/comments","statuses_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/statuses/9bcc9f51eda2c7d4b74b8537921fd719e27a806c","head":{"label":"maksymko:profileMessages","ref":"profileMessages","sha":"9bcc9f51eda2c7d4b74b8537921fd719e27a806c","user":{"login":"maksymko","id":1571559,"avatar_url":"https://avatars1.githubusercontent.com/u/1571559?v=4","gravatar_id":"","url":"https://api.github.com/users/maksymko","html_url":"https://github.com/maksymko","followers_url":"https://api.github.com/users/maksymko/followers","following_url":"https://api.github.com/users/maksymko/following{/other_user}","gists_url":"https://api.github.com/users/maksymko/gists{/gist_id}","starred_url":"https://api.github.com/users/maksymko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maksymko/subscriptions","organizations_url":"https://api.github.com/users/maksymko/orgs","repos_url":"https://api.github.com/users/maksymko/repos","events_url":"https://api.github.com/users/maksymko/events{/privacy}","received_events_url":"https://api.github.com/users/maksymko/received_events","type":"User","site_admin":false},"repo":{"id":121471410,"name":"CodeU-Spring-2018","full_name":"maksymko/CodeU-Spring-2018","owner":{"login":"maksymko","id":1571559,"avatar_url":"https://avatars1.githubusercontent.com/u/1571559?v=4","gravatar_id":"","url":"https://api.github.com/users/maksymko","html_url":"https://github.com/maksymko","followers_url":"https://api.github.com/users/maksymko/followers","following_url":"https://api.github.com/users/maksymko/following{/other_user}","gists_url":"https://api.github.com/users/maksymko/gists{/gist_id}","starred_url":"https://api.github.com/users/maksymko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maksymko/subscriptions","organizations_url":"https://api.github.com/users/maksymko/orgs","repos_url":"https://api.github.com/users/maksymko/repos","events_url":"https://api.github.com/users/maksymko/events{/privacy}","received_events_url":"https://api.github.com/users/maksymko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maksymko/CodeU-Spring-2018","description":null,"fork":false,"url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018","forks_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/forks","keys_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/teams","hooks_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/hooks","issue_events_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/events{/number}","events_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/events","assignees_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/assignees{/user}","branches_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/branches{/branch}","tags_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/tags","blobs_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/languages","stargazers_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/stargazers","contributors_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/contributors","subscribers_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/subscribers","subscription_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/subscription","commits_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/contents/{+path}","compare_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/merges","archive_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/downloads","issues_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues{/number}","pulls_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/labels{/name}","releases_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/releases{/id}","deployments_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/deployments","created_at":"2018-02-14T04:41:07Z","updated_at":"2018-04-03T19:52:28Z","pushed_at":"2018-04-06T01:16:34Z","git_url":"git://github.com/maksymko/CodeU-Spring-2018.git","ssh_url":"git@github.com:maksymko/CodeU-Spring-2018.git","clone_url":"https://github.com/maksymko/CodeU-Spring-2018.git","svn_url":"https://github.com/maksymko/CodeU-Spring-2018","homepage":null,"size":130,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":21,"watchers":2,"default_branch":"master"}},"base":{"label":"maksymko:master","ref":"master","sha":"24ec9af225ec78ae56aa6fdba29a80077b845c7f","user":{"login":"maksymko","id":1571559,"avatar_url":"https://avatars1.githubusercontent.com/u/1571559?v=4","gravatar_id":"","url":"https://api.github.com/users/maksymko","html_url":"https://github.com/maksymko","followers_url":"https://api.github.com/users/maksymko/followers","following_url":"https://api.github.com/users/maksymko/following{/other_user}","gists_url":"https://api.github.com/users/maksymko/gists{/gist_id}","starred_url":"https://api.github.com/users/maksymko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maksymko/subscriptions","organizations_url":"https://api.github.com/users/maksymko/orgs","repos_url":"https://api.github.com/users/maksymko/repos","events_url":"https://api.github.com/users/maksymko/events{/privacy}","received_events_url":"https://api.github.com/users/maksymko/received_events","type":"User","site_admin":false},"repo":{"id":121471410,"name":"CodeU-Spring-2018","full_name":"maksymko/CodeU-Spring-2018","owner":{"login":"maksymko","id":1571559,"avatar_url":"https://avatars1.githubusercontent.com/u/1571559?v=4","gravatar_id":"","url":"https://api.github.com/users/maksymko","html_url":"https://github.com/maksymko","followers_url":"https://api.github.com/users/maksymko/followers","following_url":"https://api.github.com/users/maksymko/following{/other_user}","gists_url":"https://api.github.com/users/maksymko/gists{/gist_id}","starred_url":"https://api.github.com/users/maksymko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maksymko/subscriptions","organizations_url":"https://api.github.com/users/maksymko/orgs","repos_url":"https://api.github.com/users/maksymko/repos","events_url":"https://api.github.com/users/maksymko/events{/privacy}","received_events_url":"https://api.github.com/users/maksymko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maksymko/CodeU-Spring-2018","description":null,"fork":false,"url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018","forks_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/forks","keys_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/teams","hooks_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/hooks","issue_events_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/events{/number}","events_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/events","assignees_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/assignees{/user}","branches_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/branches{/branch}","tags_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/tags","blobs_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/languages","stargazers_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/stargazers","contributors_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/contributors","subscribers_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/subscribers","subscription_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/subscription","commits_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/contents/{+path}","compare_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/merges","archive_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/downloads","issues_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues{/number}","pulls_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/labels{/name}","releases_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/releases{/id}","deployments_url":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/deployments","created_at":"2018-02-14T04:41:07Z","updated_at":"2018-04-03T19:52:28Z","pushed_at":"2018-04-06T01:16:34Z","git_url":"git://github.com/maksymko/CodeU-Spring-2018.git","ssh_url":"git@github.com:maksymko/CodeU-Spring-2018.git","clone_url":"https://github.com/maksymko/CodeU-Spring-2018.git","svn_url":"https://github.com/maksymko/CodeU-Spring-2018","homepage":null,"size":130,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":21,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50"},"html":{"href":"https://github.com/maksymko/CodeU-Spring-2018/pull/50"},"issue":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/50"},"comments":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/maksymko/CodeU-Spring-2018/statuses/9bcc9f51eda2c7d4b74b8537921fd719e27a806c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"JorgeSabella"}}