about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/compose/components/compose_form.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-10-11 01:31:03 +0200
committerGitHub <noreply@github.com>2018-10-11 01:31:03 +0200
commit87fdd139b890e60f752bf71e3b09d79eaefcf7b5 (patch)
tree16f65da67dabe51ac5f9418b2f924fb102284d60 /app/javascript/mastodon/features/compose/components/compose_form.js
parent790d3bc6370f1baf0d00ccf89e81387204c65194 (diff)
Do not push DMs into the home feed (#8940)
* Do not push DMs into the home feed

* Show DMs column after sending a DM, if DMs column is not already shown
Diffstat (limited to 'app/javascript/mastodon/features/compose/components/compose_form.js')
-rw-r--r--app/javascript/mastodon/features/compose/components/compose_form.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js
index 365114b93..27178fe19 100644
--- a/app/javascript/mastodon/features/compose/components/compose_form.js
+++ b/app/javascript/mastodon/features/compose/components/compose_form.js
@@ -30,6 +30,10 @@ const messages = defineMessages({
 export default @injectIntl
 class ComposeForm extends ImmutablePureComponent {
 
+  static contextTypes = {
+    router: PropTypes.object,
+  };
+
   static propTypes = {
     intl: PropTypes.object.isRequired,
     text: PropTypes.string.isRequired,
@@ -84,7 +88,7 @@ class ComposeForm extends ImmutablePureComponent {
       return;
     }
 
-    this.props.onSubmit();
+    this.props.onSubmit(this.context.router.history);
   }
 
   onSuggestionsClearRequested = () => {