about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx
diff options
context:
space:
mode:
authorEugen <eugen@zeonfederated.com>2017-03-15 22:55:22 +0100
committerGitHub <noreply@github.com>2017-03-15 22:55:22 +0100
commite245115f47082ffba27205f508301d14e792c369 (patch)
tree21a77b788dace45b734da6e64f1b0705016192f0 /app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx
parent620f70e42c16c324459ca2da52c68f1def8683de (diff)
parentc1124228e857b0e85f5bf927d2c41c7fadfdf955 (diff)
Merge branch 'master' into mastodon-site-api
Diffstat (limited to 'app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx')
-rw-r--r--app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx b/app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx
index 53129af6e..a67adbdd6 100644
--- a/app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx
+++ b/app/assets/javascripts/components/features/compose/containers/compose_form_container.jsx
@@ -1,5 +1,6 @@
 import { connect } from 'react-redux';
 import ComposeForm from '../components/compose_form';
+import { uploadCompose } from '../../../actions/compose';
 import { createSelector } from 'reselect';
 import {
   changeCompose,
@@ -8,6 +9,7 @@ import {
   fetchComposeSuggestions,
   selectComposeSuggestion,
   changeComposeSpoilerText,
+  insertEmojiCompose
 } from '../../../actions/compose';
 
 const getMentionedUsernames = createSelector(state => state.getIn(['compose', 'text']), text => text.match(/(?:^|[^\/\w])@([a-z0-9_]+@[a-z0-9\.\-]+)/ig));
@@ -65,6 +67,14 @@ const mapDispatchToProps = (dispatch) => ({
     dispatch(changeComposeSpoilerText(checked));
   },
 
+  onPaste (files) {
+    dispatch(uploadCompose(files));
+  },
+
+  onPickEmoji (position, data) {
+    dispatch(insertEmojiCompose(position, data));
+  },
+
 });
 
 export default connect(mapStateToProps, mapDispatchToProps)(ComposeForm);