{"action":"created","comment":{"url":"https://api.github.com/repos/MKenta/Spelack/pulls/comments/63852662","id":63852662,"diff_hunk":"@@ -1,3 +1,10 @@\n class Message < ActiveRecord::Base\n+  belongs_to :user\n   validates :text, presence: true, length: { maximum: 4000 }\n+  attr_writer :nickname\n+  validates :nickname, presence: true\n+\n+  def nickname\n+    @nickname || self.user.nickname if self.user.present?","path":"app/models/message.rb","position":8,"original_position":8,"commit_id":"fadb551e963815a49f1fb20adf8e695ce4ca0c50","original_commit_id":"22aa06c5661dea07a7183426dbea3a78b1dc783a","user":{"login":"takashi","id":1506738,"avatar_url":"https://avatars.githubusercontent.com/u/1506738?v=3","gravatar_id":"","url":"https://api.github.com/users/takashi","html_url":"https://github.com/takashi","followers_url":"https://api.github.com/users/takashi/followers","following_url":"https://api.github.com/users/takashi/following{/other_user}","gists_url":"https://api.github.com/users/takashi/gists{/gist_id}","starred_url":"https://api.github.com/users/takashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takashi/subscriptions","organizations_url":"https://api.github.com/users/takashi/orgs","repos_url":"https://api.github.com/users/takashi/repos","events_url":"https://api.github.com/users/takashi/events{/privacy}","received_events_url":"https://api.github.com/users/takashi/received_events","type":"User","site_admin":false},"body":"了解です！おねがいします","created_at":"2016-05-19T10:07:55Z","updated_at":"2016-05-19T10:07:55Z","html_url":"https://github.com/MKenta/Spelack/pull/31#discussion_r63852662","pull_request_url":"https://api.github.com/repos/MKenta/Spelack/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/MKenta/Spelack/pulls/comments/63852662"},"html":{"href":"https://github.com/MKenta/Spelack/pull/31#discussion_r63852662"},"pull_request":{"href":"https://api.github.com/repos/MKenta/Spelack/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/MKenta/Spelack/pulls/31","id":70290930,"html_url":"https://github.com/MKenta/Spelack/pull/31","diff_url":"https://github.com/MKenta/Spelack/pull/31.diff","patch_url":"https://github.com/MKenta/Spelack/pull/31.patch","issue_url":"https://api.github.com/repos/MKenta/Spelack/issues/31","number":31,"state":"open","locked":false,"title":"機能統合(realtime-chat => user&&channel)","user":{"login":"MKenta","id":4222647,"avatar_url":"https://avatars.githubusercontent.com/u/4222647?v=3","gravatar_id":"","url":"https://api.github.com/users/MKenta","html_url":"https://github.com/MKenta","followers_url":"https://api.github.com/users/MKenta/followers","following_url":"https://api.github.com/users/MKenta/following{/other_user}","gists_url":"https://api.github.com/users/MKenta/gists{/gist_id}","starred_url":"https://api.github.com/users/MKenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKenta/subscriptions","organizations_url":"https://api.github.com/users/MKenta/orgs","repos_url":"https://api.github.com/users/MKenta/repos","events_url":"https://api.github.com/users/MKenta/events{/privacy}","received_events_url":"https://api.github.com/users/MKenta/received_events","type":"User","site_admin":false},"body":"# must\r\n- chatとuser&&channel機能の統合\r\n## TODOリスト\r\n- [x] userに紐付いたchat機能\r\n- [x] channelに紐付いたchat機能\r\n- [x] 特定のuserがchannelに参加した状態でのチャット\r\n- [ ] テスト(別PRで対応)\r\n\r\n# option\r\n## 見て欲しいところ(不安点などあれば書く)\r\n各機能の連携ができているか\r\n連携に関する問題がないか\r\nテスト(future含む)に問題がないか\r\n","created_at":"2016-05-17T02:22:46Z","updated_at":"2016-05-19T10:07:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03c21caf56ba1d71225be58c4d5a1e8d18b4fca2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MKenta/Spelack/pulls/31/commits","review_comments_url":"https://api.github.com/repos/MKenta/Spelack/pulls/31/comments","review_comment_url":"https://api.github.com/repos/MKenta/Spelack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MKenta/Spelack/issues/31/comments","statuses_url":"https://api.github.com/repos/MKenta/Spelack/statuses/fadb551e963815a49f1fb20adf8e695ce4ca0c50","head":{"label":"MKenta:future-chat","ref":"future-chat","sha":"fadb551e963815a49f1fb20adf8e695ce4ca0c50","user":{"login":"MKenta","id":4222647,"avatar_url":"https://avatars.githubusercontent.com/u/4222647?v=3","gravatar_id":"","url":"https://api.github.com/users/MKenta","html_url":"https://github.com/MKenta","followers_url":"https://api.github.com/users/MKenta/followers","following_url":"https://api.github.com/users/MKenta/following{/other_user}","gists_url":"https://api.github.com/users/MKenta/gists{/gist_id}","starred_url":"https://api.github.com/users/MKenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKenta/subscriptions","organizations_url":"https://api.github.com/users/MKenta/orgs","repos_url":"https://api.github.com/users/MKenta/repos","events_url":"https://api.github.com/users/MKenta/events{/privacy}","received_events_url":"https://api.github.com/users/MKenta/received_events","type":"User","site_admin":false},"repo":{"id":56564211,"name":"Spelack","full_name":"MKenta/Spelack","owner":{"login":"MKenta","id":4222647,"avatar_url":"https://avatars.githubusercontent.com/u/4222647?v=3","gravatar_id":"","url":"https://api.github.com/users/MKenta","html_url":"https://github.com/MKenta","followers_url":"https://api.github.com/users/MKenta/followers","following_url":"https://api.github.com/users/MKenta/following{/other_user}","gists_url":"https://api.github.com/users/MKenta/gists{/gist_id}","starred_url":"https://api.github.com/users/MKenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKenta/subscriptions","organizations_url":"https://api.github.com/users/MKenta/orgs","repos_url":"https://api.github.com/users/MKenta/repos","events_url":"https://api.github.com/users/MKenta/events{/privacy}","received_events_url":"https://api.github.com/users/MKenta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MKenta/Spelack","description":"Clone Slack powered with Rails + React.js + ActionCable","fork":false,"url":"https://api.github.com/repos/MKenta/Spelack","forks_url":"https://api.github.com/repos/MKenta/Spelack/forks","keys_url":"https://api.github.com/repos/MKenta/Spelack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MKenta/Spelack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MKenta/Spelack/teams","hooks_url":"https://api.github.com/repos/MKenta/Spelack/hooks","issue_events_url":"https://api.github.com/repos/MKenta/Spelack/issues/events{/number}","events_url":"https://api.github.com/repos/MKenta/Spelack/events","assignees_url":"https://api.github.com/repos/MKenta/Spelack/assignees{/user}","branches_url":"https://api.github.com/repos/MKenta/Spelack/branches{/branch}","tags_url":"https://api.github.com/repos/MKenta/Spelack/tags","blobs_url":"https://api.github.com/repos/MKenta/Spelack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MKenta/Spelack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MKenta/Spelack/git/refs{/sha}","trees_url":"https://api.github.com/repos/MKenta/Spelack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MKenta/Spelack/statuses/{sha}","languages_url":"https://api.github.com/repos/MKenta/Spelack/languages","stargazers_url":"https://api.github.com/repos/MKenta/Spelack/stargazers","contributors_url":"https://api.github.com/repos/MKenta/Spelack/contributors","subscribers_url":"https://api.github.com/repos/MKenta/Spelack/subscribers","subscription_url":"https://api.github.com/repos/MKenta/Spelack/subscription","commits_url":"https://api.github.com/repos/MKenta/Spelack/commits{/sha}","git_commits_url":"https://api.github.com/repos/MKenta/Spelack/git/commits{/sha}","comments_url":"https://api.github.com/repos/MKenta/Spelack/comments{/number}","issue_comment_url":"https://api.github.com/repos/MKenta/Spelack/issues/comments{/number}","contents_url":"https://api.github.com/repos/MKenta/Spelack/contents/{+path}","compare_url":"https://api.github.com/repos/MKenta/Spelack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MKenta/Spelack/merges","archive_url":"https://api.github.com/repos/MKenta/Spelack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MKenta/Spelack/downloads","issues_url":"https://api.github.com/repos/MKenta/Spelack/issues{/number}","pulls_url":"https://api.github.com/repos/MKenta/Spelack/pulls{/number}","milestones_url":"https://api.github.com/repos/MKenta/Spelack/milestones{/number}","notifications_url":"https://api.github.com/repos/MKenta/Spelack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MKenta/Spelack/labels{/name}","releases_url":"https://api.github.com/repos/MKenta/Spelack/releases{/id}","deployments_url":"https://api.github.com/repos/MKenta/Spelack/deployments","created_at":"2016-04-19T04:18:26Z","updated_at":"2016-04-22T10:26:17Z","pushed_at":"2016-05-19T10:01:36Z","git_url":"git://github.com/MKenta/Spelack.git","ssh_url":"git@github.com:MKenta/Spelack.git","clone_url":"https://github.com/MKenta/Spelack.git","svn_url":"https://github.com/MKenta/Spelack","homepage":"","size":5162,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"MKenta:future","ref":"future","sha":"ce62bd88db903b0c596aa103db318f2970fc652d","user":{"login":"MKenta","id":4222647,"avatar_url":"https://avatars.githubusercontent.com/u/4222647?v=3","gravatar_id":"","url":"https://api.github.com/users/MKenta","html_url":"https://github.com/MKenta","followers_url":"https://api.github.com/users/MKenta/followers","following_url":"https://api.github.com/users/MKenta/following{/other_user}","gists_url":"https://api.github.com/users/MKenta/gists{/gist_id}","starred_url":"https://api.github.com/users/MKenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKenta/subscriptions","organizations_url":"https://api.github.com/users/MKenta/orgs","repos_url":"https://api.github.com/users/MKenta/repos","events_url":"https://api.github.com/users/MKenta/events{/privacy}","received_events_url":"https://api.github.com/users/MKenta/received_events","type":"User","site_admin":false},"repo":{"id":56564211,"name":"Spelack","full_name":"MKenta/Spelack","owner":{"login":"MKenta","id":4222647,"avatar_url":"https://avatars.githubusercontent.com/u/4222647?v=3","gravatar_id":"","url":"https://api.github.com/users/MKenta","html_url":"https://github.com/MKenta","followers_url":"https://api.github.com/users/MKenta/followers","following_url":"https://api.github.com/users/MKenta/following{/other_user}","gists_url":"https://api.github.com/users/MKenta/gists{/gist_id}","starred_url":"https://api.github.com/users/MKenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKenta/subscriptions","organizations_url":"https://api.github.com/users/MKenta/orgs","repos_url":"https://api.github.com/users/MKenta/repos","events_url":"https://api.github.com/users/MKenta/events{/privacy}","received_events_url":"https://api.github.com/users/MKenta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MKenta/Spelack","description":"Clone Slack powered with Rails + React.js + ActionCable","fork":false,"url":"https://api.github.com/repos/MKenta/Spelack","forks_url":"https://api.github.com/repos/MKenta/Spelack/forks","keys_url":"https://api.github.com/repos/MKenta/Spelack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MKenta/Spelack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MKenta/Spelack/teams","hooks_url":"https://api.github.com/repos/MKenta/Spelack/hooks","issue_events_url":"https://api.github.com/repos/MKenta/Spelack/issues/events{/number}","events_url":"https://api.github.com/repos/MKenta/Spelack/events","assignees_url":"https://api.github.com/repos/MKenta/Spelack/assignees{/user}","branches_url":"https://api.github.com/repos/MKenta/Spelack/branches{/branch}","tags_url":"https://api.github.com/repos/MKenta/Spelack/tags","blobs_url":"https://api.github.com/repos/MKenta/Spelack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MKenta/Spelack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MKenta/Spelack/git/refs{/sha}","trees_url":"https://api.github.com/repos/MKenta/Spelack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MKenta/Spelack/statuses/{sha}","languages_url":"https://api.github.com/repos/MKenta/Spelack/languages","stargazers_url":"https://api.github.com/repos/MKenta/Spelack/stargazers","contributors_url":"https://api.github.com/repos/MKenta/Spelack/contributors","subscribers_url":"https://api.github.com/repos/MKenta/Spelack/subscribers","subscription_url":"https://api.github.com/repos/MKenta/Spelack/subscription","commits_url":"https://api.github.com/repos/MKenta/Spelack/commits{/sha}","git_commits_url":"https://api.github.com/repos/MKenta/Spelack/git/commits{/sha}","comments_url":"https://api.github.com/repos/MKenta/Spelack/comments{/number}","issue_comment_url":"https://api.github.com/repos/MKenta/Spelack/issues/comments{/number}","contents_url":"https://api.github.com/repos/MKenta/Spelack/contents/{+path}","compare_url":"https://api.github.com/repos/MKenta/Spelack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MKenta/Spelack/merges","archive_url":"https://api.github.com/repos/MKenta/Spelack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MKenta/Spelack/downloads","issues_url":"https://api.github.com/repos/MKenta/Spelack/issues{/number}","pulls_url":"https://api.github.com/repos/MKenta/Spelack/pulls{/number}","milestones_url":"https://api.github.com/repos/MKenta/Spelack/milestones{/number}","notifications_url":"https://api.github.com/repos/MKenta/Spelack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MKenta/Spelack/labels{/name}","releases_url":"https://api.github.com/repos/MKenta/Spelack/releases{/id}","deployments_url":"https://api.github.com/repos/MKenta/Spelack/deployments","created_at":"2016-04-19T04:18:26Z","updated_at":"2016-04-22T10:26:17Z","pushed_at":"2016-05-19T10:01:36Z","git_url":"git://github.com/MKenta/Spelack.git","ssh_url":"git@github.com:MKenta/Spelack.git","clone_url":"https://github.com/MKenta/Spelack.git","svn_url":"https://github.com/MKenta/Spelack","homepage":"","size":5162,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MKenta/Spelack/pulls/31"},"html":{"href":"https://github.com/MKenta/Spelack/pull/31"},"issue":{"href":"https://api.github.com/repos/MKenta/Spelack/issues/31"},"comments":{"href":"https://api.github.com/repos/MKenta/Spelack/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/MKenta/Spelack/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/MKenta/Spelack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MKenta/Spelack/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/MKenta/Spelack/statuses/fadb551e963815a49f1fb20adf8e695ce4ca0c50"}}}}