{"action":"created","comment":{"url":"https://api.github.com/repos/naoki-shina/chat-space/pulls/comments/170450053","pull_request_review_id":99140131,"id":170450053,"diff_hunk":"@@ -0,0 +1,41 @@\n+$(function() {\n+  function buildHTML(message) {\n+    console.log(message)\n+    var html =\n+`<div class=\"contents__main__ajax__messagebox\">\n+  <div class=\"user_name\">\n+  ${message.user_name}\n+  </div>\n+  <div class=\"date\">\n+  ${message.created_at}\n+  </div>\n+  <div class=\"message\">\n+    ${(message.body == null)? \"\" : `<p class=\"message__body\">${message.body}</p>`}","path":"app/assets/javascripts/message.js","position":13,"original_position":13,"commit_id":"c933ae3c6eda50ba15f5777336ffce858b551c92","original_commit_id":"c933ae3c6eda50ba15f5777336ffce858b551c92","user":{"login":"takeru56","id":25771265,"avatar_url":"https://avatars3.githubusercontent.com/u/25771265?v=4","gravatar_id":"","url":"https://api.github.com/users/takeru56","html_url":"https://github.com/takeru56","followers_url":"https://api.github.com/users/takeru56/followers","following_url":"https://api.github.com/users/takeru56/following{/other_user}","gists_url":"https://api.github.com/users/takeru56/gists{/gist_id}","starred_url":"https://api.github.com/users/takeru56/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takeru56/subscriptions","organizations_url":"https://api.github.com/users/takeru56/orgs","repos_url":"https://api.github.com/users/takeru56/repos","events_url":"https://api.github.com/users/takeru56/events{/privacy}","received_events_url":"https://api.github.com/users/takeru56/received_events","type":"User","site_admin":false},"body":"console.logなどで確認していただければわかると思うのですが、imageだけが投稿された際には、message.body は```null```ではなく``` ' '```になっているかと思います。\r\n仮にそうだとしたら、この一行は不要になるかとおもいますので、確認してみてください。","created_at":"2018-02-25T11:33:51Z","updated_at":"2018-02-25T11:34:37Z","html_url":"https://github.com/naoki-shina/chat-space/pull/4#discussion_r170450053","pull_request_url":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/naoki-shina/chat-space/pulls/comments/170450053"},"html":{"href":"https://github.com/naoki-shina/chat-space/pull/4#discussion_r170450053"},"pull_request":{"href":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4","id":171224396,"html_url":"https://github.com/naoki-shina/chat-space/pull/4","diff_url":"https://github.com/naoki-shina/chat-space/pull/4.diff","patch_url":"https://github.com/naoki-shina/chat-space/pull/4.patch","issue_url":"https://api.github.com/repos/naoki-shina/chat-space/issues/4","number":4,"state":"open","locked":false,"title":"[WIP]Asynchronous post messages","user":{"login":"naoki-shina","id":35371216,"avatar_url":"https://avatars2.githubusercontent.com/u/35371216?v=4","gravatar_id":"","url":"https://api.github.com/users/naoki-shina","html_url":"https://github.com/naoki-shina","followers_url":"https://api.github.com/users/naoki-shina/followers","following_url":"https://api.github.com/users/naoki-shina/following{/other_user}","gists_url":"https://api.github.com/users/naoki-shina/gists{/gist_id}","starred_url":"https://api.github.com/users/naoki-shina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naoki-shina/subscriptions","organizations_url":"https://api.github.com/users/naoki-shina/orgs","repos_url":"https://api.github.com/users/naoki-shina/repos","events_url":"https://api.github.com/users/naoki-shina/events{/privacy}","received_events_url":"https://api.github.com/users/naoki-shina/received_events","type":"User","site_admin":false},"body":"# What\r\nintroduction of Chat space asynchronous communication post message\r\n\r\n# Why\r\nit's useful to be able to check your message when you post\r\n\r\n# gif\r\n![sample2](https://user-images.githubusercontent.com/35371216/36640682-23c80788-1a67-11e8-80d4-4a957ce420df.gif)\r\n","created_at":"2018-02-25T11:03:50Z","updated_at":"2018-02-25T11:34:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da548baa7a226bb458f94834fe384bfbc73f3bfa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4/commits","review_comments_url":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4/comments","review_comment_url":"https://api.github.com/repos/naoki-shina/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/naoki-shina/chat-space/issues/4/comments","statuses_url":"https://api.github.com/repos/naoki-shina/chat-space/statuses/c933ae3c6eda50ba15f5777336ffce858b551c92","head":{"label":"naoki-shina:asynchronous","ref":"asynchronous","sha":"c933ae3c6eda50ba15f5777336ffce858b551c92","user":{"login":"naoki-shina","id":35371216,"avatar_url":"https://avatars2.githubusercontent.com/u/35371216?v=4","gravatar_id":"","url":"https://api.github.com/users/naoki-shina","html_url":"https://github.com/naoki-shina","followers_url":"https://api.github.com/users/naoki-shina/followers","following_url":"https://api.github.com/users/naoki-shina/following{/other_user}","gists_url":"https://api.github.com/users/naoki-shina/gists{/gist_id}","starred_url":"https://api.github.com/users/naoki-shina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naoki-shina/subscriptions","organizations_url":"https://api.github.com/users/naoki-shina/orgs","repos_url":"https://api.github.com/users/naoki-shina/repos","events_url":"https://api.github.com/users/naoki-shina/events{/privacy}","received_events_url":"https://api.github.com/users/naoki-shina/received_events","type":"User","site_admin":false},"repo":{"id":120757204,"name":"chat-space","full_name":"naoki-shina/chat-space","owner":{"login":"naoki-shina","id":35371216,"avatar_url":"https://avatars2.githubusercontent.com/u/35371216?v=4","gravatar_id":"","url":"https://api.github.com/users/naoki-shina","html_url":"https://github.com/naoki-shina","followers_url":"https://api.github.com/users/naoki-shina/followers","following_url":"https://api.github.com/users/naoki-shina/following{/other_user}","gists_url":"https://api.github.com/users/naoki-shina/gists{/gist_id}","starred_url":"https://api.github.com/users/naoki-shina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naoki-shina/subscriptions","organizations_url":"https://api.github.com/users/naoki-shina/orgs","repos_url":"https://api.github.com/users/naoki-shina/repos","events_url":"https://api.github.com/users/naoki-shina/events{/privacy}","received_events_url":"https://api.github.com/users/naoki-shina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/naoki-shina/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/naoki-shina/chat-space","forks_url":"https://api.github.com/repos/naoki-shina/chat-space/forks","keys_url":"https://api.github.com/repos/naoki-shina/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/naoki-shina/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/naoki-shina/chat-space/teams","hooks_url":"https://api.github.com/repos/naoki-shina/chat-space/hooks","issue_events_url":"https://api.github.com/repos/naoki-shina/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/naoki-shina/chat-space/events","assignees_url":"https://api.github.com/repos/naoki-shina/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/naoki-shina/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/naoki-shina/chat-space/tags","blobs_url":"https://api.github.com/repos/naoki-shina/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/naoki-shina/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/naoki-shina/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/naoki-shina/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/naoki-shina/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/naoki-shina/chat-space/languages","stargazers_url":"https://api.github.com/repos/naoki-shina/chat-space/stargazers","contributors_url":"https://api.github.com/repos/naoki-shina/chat-space/contributors","subscribers_url":"https://api.github.com/repos/naoki-shina/chat-space/subscribers","subscription_url":"https://api.github.com/repos/naoki-shina/chat-space/subscription","commits_url":"https://api.github.com/repos/naoki-shina/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/naoki-shina/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/naoki-shina/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/naoki-shina/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/naoki-shina/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/naoki-shina/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/naoki-shina/chat-space/merges","archive_url":"https://api.github.com/repos/naoki-shina/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/naoki-shina/chat-space/downloads","issues_url":"https://api.github.com/repos/naoki-shina/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/naoki-shina/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/naoki-shina/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/naoki-shina/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/naoki-shina/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/naoki-shina/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/naoki-shina/chat-space/deployments","created_at":"2018-02-08T12:13:55Z","updated_at":"2018-02-08T12:16:29Z","pushed_at":"2018-02-25T11:08:51Z","git_url":"git://github.com/naoki-shina/chat-space.git","ssh_url":"git@github.com:naoki-shina/chat-space.git","clone_url":"https://github.com/naoki-shina/chat-space.git","svn_url":"https://github.com/naoki-shina/chat-space","homepage":null,"size":81,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"naoki-shina:master","ref":"master","sha":"4e8f5ef788a9a23d305ae491903a1af8eb11472d","user":{"login":"naoki-shina","id":35371216,"avatar_url":"https://avatars2.githubusercontent.com/u/35371216?v=4","gravatar_id":"","url":"https://api.github.com/users/naoki-shina","html_url":"https://github.com/naoki-shina","followers_url":"https://api.github.com/users/naoki-shina/followers","following_url":"https://api.github.com/users/naoki-shina/following{/other_user}","gists_url":"https://api.github.com/users/naoki-shina/gists{/gist_id}","starred_url":"https://api.github.com/users/naoki-shina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naoki-shina/subscriptions","organizations_url":"https://api.github.com/users/naoki-shina/orgs","repos_url":"https://api.github.com/users/naoki-shina/repos","events_url":"https://api.github.com/users/naoki-shina/events{/privacy}","received_events_url":"https://api.github.com/users/naoki-shina/received_events","type":"User","site_admin":false},"repo":{"id":120757204,"name":"chat-space","full_name":"naoki-shina/chat-space","owner":{"login":"naoki-shina","id":35371216,"avatar_url":"https://avatars2.githubusercontent.com/u/35371216?v=4","gravatar_id":"","url":"https://api.github.com/users/naoki-shina","html_url":"https://github.com/naoki-shina","followers_url":"https://api.github.com/users/naoki-shina/followers","following_url":"https://api.github.com/users/naoki-shina/following{/other_user}","gists_url":"https://api.github.com/users/naoki-shina/gists{/gist_id}","starred_url":"https://api.github.com/users/naoki-shina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naoki-shina/subscriptions","organizations_url":"https://api.github.com/users/naoki-shina/orgs","repos_url":"https://api.github.com/users/naoki-shina/repos","events_url":"https://api.github.com/users/naoki-shina/events{/privacy}","received_events_url":"https://api.github.com/users/naoki-shina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/naoki-shina/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/naoki-shina/chat-space","forks_url":"https://api.github.com/repos/naoki-shina/chat-space/forks","keys_url":"https://api.github.com/repos/naoki-shina/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/naoki-shina/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/naoki-shina/chat-space/teams","hooks_url":"https://api.github.com/repos/naoki-shina/chat-space/hooks","issue_events_url":"https://api.github.com/repos/naoki-shina/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/naoki-shina/chat-space/events","assignees_url":"https://api.github.com/repos/naoki-shina/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/naoki-shina/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/naoki-shina/chat-space/tags","blobs_url":"https://api.github.com/repos/naoki-shina/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/naoki-shina/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/naoki-shina/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/naoki-shina/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/naoki-shina/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/naoki-shina/chat-space/languages","stargazers_url":"https://api.github.com/repos/naoki-shina/chat-space/stargazers","contributors_url":"https://api.github.com/repos/naoki-shina/chat-space/contributors","subscribers_url":"https://api.github.com/repos/naoki-shina/chat-space/subscribers","subscription_url":"https://api.github.com/repos/naoki-shina/chat-space/subscription","commits_url":"https://api.github.com/repos/naoki-shina/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/naoki-shina/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/naoki-shina/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/naoki-shina/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/naoki-shina/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/naoki-shina/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/naoki-shina/chat-space/merges","archive_url":"https://api.github.com/repos/naoki-shina/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/naoki-shina/chat-space/downloads","issues_url":"https://api.github.com/repos/naoki-shina/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/naoki-shina/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/naoki-shina/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/naoki-shina/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/naoki-shina/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/naoki-shina/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/naoki-shina/chat-space/deployments","created_at":"2018-02-08T12:13:55Z","updated_at":"2018-02-08T12:16:29Z","pushed_at":"2018-02-25T11:08:51Z","git_url":"git://github.com/naoki-shina/chat-space.git","ssh_url":"git@github.com:naoki-shina/chat-space.git","clone_url":"https://github.com/naoki-shina/chat-space.git","svn_url":"https://github.com/naoki-shina/chat-space","homepage":null,"size":81,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4"},"html":{"href":"https://github.com/naoki-shina/chat-space/pull/4"},"issue":{"href":"https://api.github.com/repos/naoki-shina/chat-space/issues/4"},"comments":{"href":"https://api.github.com/repos/naoki-shina/chat-space/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/naoki-shina/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/naoki-shina/chat-space/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/naoki-shina/chat-space/statuses/c933ae3c6eda50ba15f5777336ffce858b551c92"}},"author_association":"OWNER"}}
{"actor":{"display_login":"takeru56"}}