{"action":"created","comment":{"url":"https://api.github.com/repos/syuilo/Misskey/pulls/comments/26807263","id":26807263,"diff_hunk":"@@ -0,0 +1,49 @@\n+require! {\n+\t'../../auth': authorize\t\t\n+\t'../../../config'\n+\tfs\n+\tgm\n+\t'../../../utils/streaming': Streamer\n+\t'../../../models/talk-message': TalkMessage\n+\t'../../../models/talk-message-image': TalkMessageImage\n+\t'../../../models/user-following': UserFollowing\n+}\n+\n+exports = (req, res) ->\n+\tauthorize req, res, (user, app) ->\n+\t\ttext = if req.body.text? then req.body.text else ''\n+\t\totherparty-id = req.body.otherparty_id\n+\t\tswitch\n+\t\t| !otherparty-id? => res.api-error 400 'otherparty_id parameter is required :('\n+\t\t| _ => UserFollowing.is-following otherparty-id, user.id, (is-following) ->\n+\t\t\t| !is-following => res.api-error 400 'You are not followed from this user. To send a message, you need to have been followed from the other party.'\n+\t\t\t| _ => \n+\t\t\t\tswitch\n+\t\t\t\t| Object.keys req.files .length === 1 =>\n+\t\t\t\t\tpath = req.files.image.path\n+\t\t\t\t\timage-quality = if user.is-premium then 100 else 70\n+\t\t\t\t\tgm path\n+\t\t\t\t\t\t..compress 'jpeg'","path":"src/api/rest/talk/say.ls","position":26,"original_position":26,"commit_id":"98cafb1ad48b998e41e1fc4b3786d0aa53d643c0","original_commit_id":"98cafb1ad48b998e41e1fc4b3786d0aa53d643c0","user":{"login":"syuilo","id":4439005,"avatar_url":"https://avatars.githubusercontent.com/u/4439005?v=3","gravatar_id":"","url":"https://api.github.com/users/syuilo","html_url":"https://github.com/syuilo","followers_url":"https://api.github.com/users/syuilo/followers","following_url":"https://api.github.com/users/syuilo/following{/other_user}","gists_url":"https://api.github.com/users/syuilo/gists{/gist_id}","starred_url":"https://api.github.com/users/syuilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syuilo/subscriptions","organizations_url":"https://api.github.com/users/syuilo/orgs","repos_url":"https://api.github.com/users/syuilo/repos","events_url":"https://api.github.com/users/syuilo/events{/privacy}","received_events_url":"https://api.github.com/users/syuilo/received_events","type":"User","site_admin":false},"body":"Use backslash","created_at":"2015-03-19T23:14:12Z","updated_at":"2015-03-19T23:14:12Z","html_url":"https://github.com/syuilo/Misskey/pull/300#discussion_r26807263","pull_request_url":"https://api.github.com/repos/syuilo/Misskey/pulls/300","_links":{"self":{"href":"https://api.github.com/repos/syuilo/Misskey/pulls/comments/26807263"},"html":{"href":"https://github.com/syuilo/Misskey/pull/300#discussion_r26807263"},"pull_request":{"href":"https://api.github.com/repos/syuilo/Misskey/pulls/300"}}},"pull_request":{"url":"https://api.github.com/repos/syuilo/Misskey/pulls/300","id":31572866,"html_url":"https://github.com/syuilo/Misskey/pull/300","diff_url":"https://github.com/syuilo/Misskey/pull/300.diff","patch_url":"https://github.com/syuilo/Misskey/pull/300.patch","issue_url":"https://api.github.com/repos/syuilo/Misskey/issues/300","number":300,"state":"open","locked":false,"title":"src/api/rest/talk/say.ts to say.ls","user":{"login":"afuafu55","id":11005205,"avatar_url":"https://avatars.githubusercontent.com/u/11005205?v=3","gravatar_id":"","url":"https://api.github.com/users/afuafu55","html_url":"https://github.com/afuafu55","followers_url":"https://api.github.com/users/afuafu55/followers","following_url":"https://api.github.com/users/afuafu55/following{/other_user}","gists_url":"https://api.github.com/users/afuafu55/gists{/gist_id}","starred_url":"https://api.github.com/users/afuafu55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afuafu55/subscriptions","organizations_url":"https://api.github.com/users/afuafu55/orgs","repos_url":"https://api.github.com/users/afuafu55/repos","events_url":"https://api.github.com/users/afuafu55/events{/privacy}","received_events_url":"https://api.github.com/users/afuafu55/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-19T22:31:18Z","updated_at":"2015-03-19T23:14:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7ddd3b2d3bf60f493abcf925f6616bc867d5b48","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/syuilo/Misskey/pulls/300/commits","review_comments_url":"https://api.github.com/repos/syuilo/Misskey/pulls/300/comments","review_comment_url":"https://api.github.com/repos/syuilo/Misskey/pulls/comments{/number}","comments_url":"https://api.github.com/repos/syuilo/Misskey/issues/300/comments","statuses_url":"https://api.github.com/repos/syuilo/Misskey/statuses/98cafb1ad48b998e41e1fc4b3786d0aa53d643c0","head":{"label":"afuafu55:patch-1","ref":"patch-1","sha":"98cafb1ad48b998e41e1fc4b3786d0aa53d643c0","user":{"login":"afuafu55","id":11005205,"avatar_url":"https://avatars.githubusercontent.com/u/11005205?v=3","gravatar_id":"","url":"https://api.github.com/users/afuafu55","html_url":"https://github.com/afuafu55","followers_url":"https://api.github.com/users/afuafu55/followers","following_url":"https://api.github.com/users/afuafu55/following{/other_user}","gists_url":"https://api.github.com/users/afuafu55/gists{/gist_id}","starred_url":"https://api.github.com/users/afuafu55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afuafu55/subscriptions","organizations_url":"https://api.github.com/users/afuafu55/orgs","repos_url":"https://api.github.com/users/afuafu55/repos","events_url":"https://api.github.com/users/afuafu55/events{/privacy}","received_events_url":"https://api.github.com/users/afuafu55/received_events","type":"User","site_admin":false},"repo":{"id":31813142,"name":"Misskey","full_name":"afuafu55/Misskey","owner":{"login":"afuafu55","id":11005205,"avatar_url":"https://avatars.githubusercontent.com/u/11005205?v=3","gravatar_id":"","url":"https://api.github.com/users/afuafu55","html_url":"https://github.com/afuafu55","followers_url":"https://api.github.com/users/afuafu55/followers","following_url":"https://api.github.com/users/afuafu55/following{/other_user}","gists_url":"https://api.github.com/users/afuafu55/gists{/gist_id}","starred_url":"https://api.github.com/users/afuafu55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afuafu55/subscriptions","organizations_url":"https://api.github.com/users/afuafu55/orgs","repos_url":"https://api.github.com/users/afuafu55/repos","events_url":"https://api.github.com/users/afuafu55/events{/privacy}","received_events_url":"https://api.github.com/users/afuafu55/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afuafu55/Misskey","description":"ゆるゆりが好きすぎて作られたゆるSNS。","fork":true,"url":"https://api.github.com/repos/afuafu55/Misskey","forks_url":"https://api.github.com/repos/afuafu55/Misskey/forks","keys_url":"https://api.github.com/repos/afuafu55/Misskey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afuafu55/Misskey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afuafu55/Misskey/teams","hooks_url":"https://api.github.com/repos/afuafu55/Misskey/hooks","issue_events_url":"https://api.github.com/repos/afuafu55/Misskey/issues/events{/number}","events_url":"https://api.github.com/repos/afuafu55/Misskey/events","assignees_url":"https://api.github.com/repos/afuafu55/Misskey/assignees{/user}","branches_url":"https://api.github.com/repos/afuafu55/Misskey/branches{/branch}","tags_url":"https://api.github.com/repos/afuafu55/Misskey/tags","blobs_url":"https://api.github.com/repos/afuafu55/Misskey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afuafu55/Misskey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afuafu55/Misskey/git/refs{/sha}","trees_url":"https://api.github.com/repos/afuafu55/Misskey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afuafu55/Misskey/statuses/{sha}","languages_url":"https://api.github.com/repos/afuafu55/Misskey/languages","stargazers_url":"https://api.github.com/repos/afuafu55/Misskey/stargazers","contributors_url":"https://api.github.com/repos/afuafu55/Misskey/contributors","subscribers_url":"https://api.github.com/repos/afuafu55/Misskey/subscribers","subscription_url":"https://api.github.com/repos/afuafu55/Misskey/subscription","commits_url":"https://api.github.com/repos/afuafu55/Misskey/commits{/sha}","git_commits_url":"https://api.github.com/repos/afuafu55/Misskey/git/commits{/sha}","comments_url":"https://api.github.com/repos/afuafu55/Misskey/comments{/number}","issue_comment_url":"https://api.github.com/repos/afuafu55/Misskey/issues/comments{/number}","contents_url":"https://api.github.com/repos/afuafu55/Misskey/contents/{+path}","compare_url":"https://api.github.com/repos/afuafu55/Misskey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afuafu55/Misskey/merges","archive_url":"https://api.github.com/repos/afuafu55/Misskey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afuafu55/Misskey/downloads","issues_url":"https://api.github.com/repos/afuafu55/Misskey/issues{/number}","pulls_url":"https://api.github.com/repos/afuafu55/Misskey/pulls{/number}","milestones_url":"https://api.github.com/repos/afuafu55/Misskey/milestones{/number}","notifications_url":"https://api.github.com/repos/afuafu55/Misskey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afuafu55/Misskey/labels{/name}","releases_url":"https://api.github.com/repos/afuafu55/Misskey/releases{/id}","created_at":"2015-03-07T13:39:43Z","updated_at":"2015-03-19T22:12:00Z","pushed_at":"2015-03-19T22:30:59Z","git_url":"git://github.com/afuafu55/Misskey.git","ssh_url":"git@github.com:afuafu55/Misskey.git","clone_url":"https://github.com/afuafu55/Misskey.git","svn_url":"https://github.com/afuafu55/Misskey","homepage":"https://misskey.xyz/","size":27576,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"develop"}},"base":{"label":"syuilo:develop","ref":"develop","sha":"b0aa2063a105ce3084602c4da57bef1c8c7b4bca","user":{"login":"syuilo","id":4439005,"avatar_url":"https://avatars.githubusercontent.com/u/4439005?v=3","gravatar_id":"","url":"https://api.github.com/users/syuilo","html_url":"https://github.com/syuilo","followers_url":"https://api.github.com/users/syuilo/followers","following_url":"https://api.github.com/users/syuilo/following{/other_user}","gists_url":"https://api.github.com/users/syuilo/gists{/gist_id}","starred_url":"https://api.github.com/users/syuilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syuilo/subscriptions","organizations_url":"https://api.github.com/users/syuilo/orgs","repos_url":"https://api.github.com/users/syuilo/repos","events_url":"https://api.github.com/users/syuilo/events{/privacy}","received_events_url":"https://api.github.com/users/syuilo/received_events","type":"User","site_admin":false},"repo":{"id":29419958,"name":"Misskey","full_name":"syuilo/Misskey","owner":{"login":"syuilo","id":4439005,"avatar_url":"https://avatars.githubusercontent.com/u/4439005?v=3","gravatar_id":"","url":"https://api.github.com/users/syuilo","html_url":"https://github.com/syuilo","followers_url":"https://api.github.com/users/syuilo/followers","following_url":"https://api.github.com/users/syuilo/following{/other_user}","gists_url":"https://api.github.com/users/syuilo/gists{/gist_id}","starred_url":"https://api.github.com/users/syuilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syuilo/subscriptions","organizations_url":"https://api.github.com/users/syuilo/orgs","repos_url":"https://api.github.com/users/syuilo/repos","events_url":"https://api.github.com/users/syuilo/events{/privacy}","received_events_url":"https://api.github.com/users/syuilo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/syuilo/Misskey","description":"オープンソースで、誰でも開発に参加できる事が特徴のSNSです。","fork":false,"url":"https://api.github.com/repos/syuilo/Misskey","forks_url":"https://api.github.com/repos/syuilo/Misskey/forks","keys_url":"https://api.github.com/repos/syuilo/Misskey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/syuilo/Misskey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/syuilo/Misskey/teams","hooks_url":"https://api.github.com/repos/syuilo/Misskey/hooks","issue_events_url":"https://api.github.com/repos/syuilo/Misskey/issues/events{/number}","events_url":"https://api.github.com/repos/syuilo/Misskey/events","assignees_url":"https://api.github.com/repos/syuilo/Misskey/assignees{/user}","branches_url":"https://api.github.com/repos/syuilo/Misskey/branches{/branch}","tags_url":"https://api.github.com/repos/syuilo/Misskey/tags","blobs_url":"https://api.github.com/repos/syuilo/Misskey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/syuilo/Misskey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/syuilo/Misskey/git/refs{/sha}","trees_url":"https://api.github.com/repos/syuilo/Misskey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/syuilo/Misskey/statuses/{sha}","languages_url":"https://api.github.com/repos/syuilo/Misskey/languages","stargazers_url":"https://api.github.com/repos/syuilo/Misskey/stargazers","contributors_url":"https://api.github.com/repos/syuilo/Misskey/contributors","subscribers_url":"https://api.github.com/repos/syuilo/Misskey/subscribers","subscription_url":"https://api.github.com/repos/syuilo/Misskey/subscription","commits_url":"https://api.github.com/repos/syuilo/Misskey/commits{/sha}","git_commits_url":"https://api.github.com/repos/syuilo/Misskey/git/commits{/sha}","comments_url":"https://api.github.com/repos/syuilo/Misskey/comments{/number}","issue_comment_url":"https://api.github.com/repos/syuilo/Misskey/issues/comments{/number}","contents_url":"https://api.github.com/repos/syuilo/Misskey/contents/{+path}","compare_url":"https://api.github.com/repos/syuilo/Misskey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/syuilo/Misskey/merges","archive_url":"https://api.github.com/repos/syuilo/Misskey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/syuilo/Misskey/downloads","issues_url":"https://api.github.com/repos/syuilo/Misskey/issues{/number}","pulls_url":"https://api.github.com/repos/syuilo/Misskey/pulls{/number}","milestones_url":"https://api.github.com/repos/syuilo/Misskey/milestones{/number}","notifications_url":"https://api.github.com/repos/syuilo/Misskey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/syuilo/Misskey/labels{/name}","releases_url":"https://api.github.com/repos/syuilo/Misskey/releases{/id}","created_at":"2015-01-18T08:17:29Z","updated_at":"2015-03-19T22:07:06Z","pushed_at":"2015-03-19T22:31:19Z","git_url":"git://github.com/syuilo/Misskey.git","ssh_url":"git@github.com:syuilo/Misskey.git","clone_url":"https://github.com/syuilo/Misskey.git","svn_url":"https://github.com/syuilo/Misskey","homepage":"https://misskey.xyz","size":33140,"stargazers_count":8,"watchers_count":8,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":16,"forks":8,"open_issues":16,"watchers":8,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/syuilo/Misskey/pulls/300"},"html":{"href":"https://github.com/syuilo/Misskey/pull/300"},"issue":{"href":"https://api.github.com/repos/syuilo/Misskey/issues/300"},"comments":{"href":"https://api.github.com/repos/syuilo/Misskey/issues/300/comments"},"review_comments":{"href":"https://api.github.com/repos/syuilo/Misskey/pulls/300/comments"},"review_comment":{"href":"https://api.github.com/repos/syuilo/Misskey/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/syuilo/Misskey/pulls/300/commits"},"statuses":{"href":"https://api.github.com/repos/syuilo/Misskey/statuses/98cafb1ad48b998e41e1fc4b3786d0aa53d643c0"}}}}