{"action":"created","comment":{"url":"https://api.github.com/repos/erxes/erxes/pulls/comments/208876464","pull_request_review_id":144774808,"id":208876464,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODg3NjQ2NA==","diff_hunk":"@@ -0,0 +1,99 @@\n+import React, { Component } from 'react';\n+import styled from 'styled-components';\n+import PropTypes from 'prop-types';\n+import { uploadHandler } from 'modules/common/utils';\n+\n+const Attachment = styled.div`\n+  margin: 10px 0;\n+\n+  img {\n+    display: inline-block;\n+    width: 35px;\n+    height: 35px;\n+    margin: 0 5px 5px 0;\n+  }\n+`;\n+\n+const propTypes = {\n+  attachments: PropTypes.array,\n+  onChange: PropTypes.func\n+};\n+\n+class Uploader extends Component {\n+  constructor(props) {\n+    super(props);\n+\n+    const { attachments } = this.props;\n+\n+    this.state = {\n+      attachments: attachments || [],\n+      attachmentPreviewStyle: {}\n+    };\n+\n+    this.handleFileInput = this.handleFileInput.bind(this);\n+  }\n+\n+  handleFileInput(e) {\n+    const files = e.target.files;\n+\n+    uploadHandler({\n+      files,\n+\n+      beforeUpload: () => {\n+        this.setState({\n+          attachmentPreviewStyle: { opacity: '0.2' }\n+        });\n+      },\n+\n+      afterUpload: ({ response, fileInfo }) => {\n+        // set attachments\n+        const attachments = [\n+          ...this.state.attachments,\n+          { url: response, ...fileInfo }\n+        ];\n+\n+        this.props.onChange('attachments', attachments);","path":"src/modules/common/components/Uploader.js","position":55,"original_position":55,"commit_id":"5607647acb06a8a9f7333ca862bb762413bb2934","original_commit_id":"5607647acb06a8a9f7333ca862bb762413bb2934","user":{"login":"batamar","id":1748899,"node_id":"MDQ6VXNlcjE3NDg4OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1748899?v=4","gravatar_id":"","url":"https://api.github.com/users/batamar","html_url":"https://github.com/batamar","followers_url":"https://api.github.com/users/batamar/followers","following_url":"https://api.github.com/users/batamar/following{/other_user}","gists_url":"https://api.github.com/users/batamar/gists{/gist_id}","starred_url":"https://api.github.com/users/batamar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batamar/subscriptions","organizations_url":"https://api.github.com/users/batamar/orgs","repos_url":"https://api.github.com/users/batamar/repos","events_url":"https://api.github.com/users/batamar/events{/privacy}","received_events_url":"https://api.github.com/users/batamar/received_events","type":"User","site_admin":false},"body":"remove first argument","created_at":"2018-08-09T10:13:30Z","updated_at":"2018-08-09T10:15:35Z","html_url":"https://github.com/erxes/erxes/pull/543#discussion_r208876464","pull_request_url":"https://api.github.com/repos/erxes/erxes/pulls/543","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/erxes/erxes/pulls/comments/208876464"},"html":{"href":"https://github.com/erxes/erxes/pull/543#discussion_r208876464"},"pull_request":{"href":"https://api.github.com/repos/erxes/erxes/pulls/543"}}},"pull_request":{"url":"https://api.github.com/repos/erxes/erxes/pulls/543","id":207260516,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MjYwNTE2","html_url":"https://github.com/erxes/erxes/pull/543","diff_url":"https://github.com/erxes/erxes/pull/543.diff","patch_url":"https://github.com/erxes/erxes/pull/543.patch","issue_url":"https://api.github.com/repos/erxes/erxes/issues/543","number":543,"state":"open","locked":false,"title":"Email attachment","user":{"login":"munkhorgil","id":978987,"node_id":"MDQ6VXNlcjk3ODk4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/978987?v=4","gravatar_id":"","url":"https://api.github.com/users/munkhorgil","html_url":"https://github.com/munkhorgil","followers_url":"https://api.github.com/users/munkhorgil/followers","following_url":"https://api.github.com/users/munkhorgil/following{/other_user}","gists_url":"https://api.github.com/users/munkhorgil/gists{/gist_id}","starred_url":"https://api.github.com/users/munkhorgil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munkhorgil/subscriptions","organizations_url":"https://api.github.com/users/munkhorgil/orgs","repos_url":"https://api.github.com/users/munkhorgil/repos","events_url":"https://api.github.com/users/munkhorgil/events{/privacy}","received_events_url":"https://api.github.com/users/munkhorgil/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-09T09:52:31Z","updated_at":"2018-08-09T10:15:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49f00443f212864077317e4becb5ef905eed9ace","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/erxes/erxes/pulls/543/commits","review_comments_url":"https://api.github.com/repos/erxes/erxes/pulls/543/comments","review_comment_url":"https://api.github.com/repos/erxes/erxes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erxes/erxes/issues/543/comments","statuses_url":"https://api.github.com/repos/erxes/erxes/statuses/5607647acb06a8a9f7333ca862bb762413bb2934","head":{"label":"erxes:email-attachment","ref":"email-attachment","sha":"5607647acb06a8a9f7333ca862bb762413bb2934","user":{"login":"erxes","id":20272096,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMjcyMDk2","avatar_url":"https://avatars2.githubusercontent.com/u/20272096?v=4","gravatar_id":"","url":"https://api.github.com/users/erxes","html_url":"https://github.com/erxes","followers_url":"https://api.github.com/users/erxes/followers","following_url":"https://api.github.com/users/erxes/following{/other_user}","gists_url":"https://api.github.com/users/erxes/gists{/gist_id}","starred_url":"https://api.github.com/users/erxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erxes/subscriptions","organizations_url":"https://api.github.com/users/erxes/orgs","repos_url":"https://api.github.com/users/erxes/repos","events_url":"https://api.github.com/users/erxes/events{/privacy}","received_events_url":"https://api.github.com/users/erxes/received_events","type":"Organization","site_admin":false},"repo":{"id":73453488,"node_id":"MDEwOlJlcG9zaXRvcnk3MzQ1MzQ4OA==","name":"erxes","full_name":"erxes/erxes","owner":{"login":"erxes","id":20272096,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMjcyMDk2","avatar_url":"https://avatars2.githubusercontent.com/u/20272096?v=4","gravatar_id":"","url":"https://api.github.com/users/erxes","html_url":"https://github.com/erxes","followers_url":"https://api.github.com/users/erxes/followers","following_url":"https://api.github.com/users/erxes/following{/other_user}","gists_url":"https://api.github.com/users/erxes/gists{/gist_id}","starred_url":"https://api.github.com/users/erxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erxes/subscriptions","organizations_url":"https://api.github.com/users/erxes/orgs","repos_url":"https://api.github.com/users/erxes/repos","events_url":"https://api.github.com/users/erxes/events{/privacy}","received_events_url":"https://api.github.com/users/erxes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/erxes/erxes","description":"erxes is an AI meets open source messaging platform for sales, marketing and support","fork":false,"url":"https://api.github.com/repos/erxes/erxes","forks_url":"https://api.github.com/repos/erxes/erxes/forks","keys_url":"https://api.github.com/repos/erxes/erxes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erxes/erxes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erxes/erxes/teams","hooks_url":"https://api.github.com/repos/erxes/erxes/hooks","issue_events_url":"https://api.github.com/repos/erxes/erxes/issues/events{/number}","events_url":"https://api.github.com/repos/erxes/erxes/events","assignees_url":"https://api.github.com/repos/erxes/erxes/assignees{/user}","branches_url":"https://api.github.com/repos/erxes/erxes/branches{/branch}","tags_url":"https://api.github.com/repos/erxes/erxes/tags","blobs_url":"https://api.github.com/repos/erxes/erxes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erxes/erxes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erxes/erxes/git/refs{/sha}","trees_url":"https://api.github.com/repos/erxes/erxes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erxes/erxes/statuses/{sha}","languages_url":"https://api.github.com/repos/erxes/erxes/languages","stargazers_url":"https://api.github.com/repos/erxes/erxes/stargazers","contributors_url":"https://api.github.com/repos/erxes/erxes/contributors","subscribers_url":"https://api.github.com/repos/erxes/erxes/subscribers","subscription_url":"https://api.github.com/repos/erxes/erxes/subscription","commits_url":"https://api.github.com/repos/erxes/erxes/commits{/sha}","git_commits_url":"https://api.github.com/repos/erxes/erxes/git/commits{/sha}","comments_url":"https://api.github.com/repos/erxes/erxes/comments{/number}","issue_comment_url":"https://api.github.com/repos/erxes/erxes/issues/comments{/number}","contents_url":"https://api.github.com/repos/erxes/erxes/contents/{+path}","compare_url":"https://api.github.com/repos/erxes/erxes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erxes/erxes/merges","archive_url":"https://api.github.com/repos/erxes/erxes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erxes/erxes/downloads","issues_url":"https://api.github.com/repos/erxes/erxes/issues{/number}","pulls_url":"https://api.github.com/repos/erxes/erxes/pulls{/number}","milestones_url":"https://api.github.com/repos/erxes/erxes/milestones{/number}","notifications_url":"https://api.github.com/repos/erxes/erxes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erxes/erxes/labels{/name}","releases_url":"https://api.github.com/repos/erxes/erxes/releases{/id}","deployments_url":"https://api.github.com/repos/erxes/erxes/deployments","created_at":"2016-11-11T06:54:50Z","updated_at":"2018-08-09T08:23:17Z","pushed_at":"2018-08-09T09:59:44Z","git_url":"git://github.com/erxes/erxes.git","ssh_url":"git@github.com:erxes/erxes.git","clone_url":"https://github.com/erxes/erxes.git","svn_url":"https://github.com/erxes/erxes","homepage":"https://erxes.io/","size":33929,"stargazers_count":157,"watchers_count":157,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":38,"open_issues":67,"watchers":157,"default_branch":"master"}},"base":{"label":"erxes:develop","ref":"develop","sha":"2dd1738bc1efb859758184b41461d79d1870766c","user":{"login":"erxes","id":20272096,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMjcyMDk2","avatar_url":"https://avatars2.githubusercontent.com/u/20272096?v=4","gravatar_id":"","url":"https://api.github.com/users/erxes","html_url":"https://github.com/erxes","followers_url":"https://api.github.com/users/erxes/followers","following_url":"https://api.github.com/users/erxes/following{/other_user}","gists_url":"https://api.github.com/users/erxes/gists{/gist_id}","starred_url":"https://api.github.com/users/erxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erxes/subscriptions","organizations_url":"https://api.github.com/users/erxes/orgs","repos_url":"https://api.github.com/users/erxes/repos","events_url":"https://api.github.com/users/erxes/events{/privacy}","received_events_url":"https://api.github.com/users/erxes/received_events","type":"Organization","site_admin":false},"repo":{"id":73453488,"node_id":"MDEwOlJlcG9zaXRvcnk3MzQ1MzQ4OA==","name":"erxes","full_name":"erxes/erxes","owner":{"login":"erxes","id":20272096,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMjcyMDk2","avatar_url":"https://avatars2.githubusercontent.com/u/20272096?v=4","gravatar_id":"","url":"https://api.github.com/users/erxes","html_url":"https://github.com/erxes","followers_url":"https://api.github.com/users/erxes/followers","following_url":"https://api.github.com/users/erxes/following{/other_user}","gists_url":"https://api.github.com/users/erxes/gists{/gist_id}","starred_url":"https://api.github.com/users/erxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erxes/subscriptions","organizations_url":"https://api.github.com/users/erxes/orgs","repos_url":"https://api.github.com/users/erxes/repos","events_url":"https://api.github.com/users/erxes/events{/privacy}","received_events_url":"https://api.github.com/users/erxes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/erxes/erxes","description":"erxes is an AI meets open source messaging platform for sales, marketing and support","fork":false,"url":"https://api.github.com/repos/erxes/erxes","forks_url":"https://api.github.com/repos/erxes/erxes/forks","keys_url":"https://api.github.com/repos/erxes/erxes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erxes/erxes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erxes/erxes/teams","hooks_url":"https://api.github.com/repos/erxes/erxes/hooks","issue_events_url":"https://api.github.com/repos/erxes/erxes/issues/events{/number}","events_url":"https://api.github.com/repos/erxes/erxes/events","assignees_url":"https://api.github.com/repos/erxes/erxes/assignees{/user}","branches_url":"https://api.github.com/repos/erxes/erxes/branches{/branch}","tags_url":"https://api.github.com/repos/erxes/erxes/tags","blobs_url":"https://api.github.com/repos/erxes/erxes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erxes/erxes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erxes/erxes/git/refs{/sha}","trees_url":"https://api.github.com/repos/erxes/erxes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erxes/erxes/statuses/{sha}","languages_url":"https://api.github.com/repos/erxes/erxes/languages","stargazers_url":"https://api.github.com/repos/erxes/erxes/stargazers","contributors_url":"https://api.github.com/repos/erxes/erxes/contributors","subscribers_url":"https://api.github.com/repos/erxes/erxes/subscribers","subscription_url":"https://api.github.com/repos/erxes/erxes/subscription","commits_url":"https://api.github.com/repos/erxes/erxes/commits{/sha}","git_commits_url":"https://api.github.com/repos/erxes/erxes/git/commits{/sha}","comments_url":"https://api.github.com/repos/erxes/erxes/comments{/number}","issue_comment_url":"https://api.github.com/repos/erxes/erxes/issues/comments{/number}","contents_url":"https://api.github.com/repos/erxes/erxes/contents/{+path}","compare_url":"https://api.github.com/repos/erxes/erxes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erxes/erxes/merges","archive_url":"https://api.github.com/repos/erxes/erxes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erxes/erxes/downloads","issues_url":"https://api.github.com/repos/erxes/erxes/issues{/number}","pulls_url":"https://api.github.com/repos/erxes/erxes/pulls{/number}","milestones_url":"https://api.github.com/repos/erxes/erxes/milestones{/number}","notifications_url":"https://api.github.com/repos/erxes/erxes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erxes/erxes/labels{/name}","releases_url":"https://api.github.com/repos/erxes/erxes/releases{/id}","deployments_url":"https://api.github.com/repos/erxes/erxes/deployments","created_at":"2016-11-11T06:54:50Z","updated_at":"2018-08-09T08:23:17Z","pushed_at":"2018-08-09T09:59:44Z","git_url":"git://github.com/erxes/erxes.git","ssh_url":"git@github.com:erxes/erxes.git","clone_url":"https://github.com/erxes/erxes.git","svn_url":"https://github.com/erxes/erxes","homepage":"https://erxes.io/","size":33929,"stargazers_count":157,"watchers_count":157,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":38,"open_issues":67,"watchers":157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/erxes/erxes/pulls/543"},"html":{"href":"https://github.com/erxes/erxes/pull/543"},"issue":{"href":"https://api.github.com/repos/erxes/erxes/issues/543"},"comments":{"href":"https://api.github.com/repos/erxes/erxes/issues/543/comments"},"review_comments":{"href":"https://api.github.com/repos/erxes/erxes/pulls/543/comments"},"review_comment":{"href":"https://api.github.com/repos/erxes/erxes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erxes/erxes/pulls/543/commits"},"statuses":{"href":"https://api.github.com/repos/erxes/erxes/statuses/5607647acb06a8a9f7333ca862bb762413bb2934"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"batamar"}}