aboutsummaryrefslogtreecommitdiff
path: root/app/javascript/mastodon/features/compose/components/upload.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/upload.js
parent790d3bc6370f1baf0d00ccf89e81387204c65194 (diff)
downloadmastodon-87fdd139b890e60f752bf71e3b09d79eaefcf7b5.tar
mastodon-87fdd139b890e60f752bf71e3b09d79eaefcf7b5.tar.gz
mastodon-87fdd139b890e60f752bf71e3b09d79eaefcf7b5.tar.bz2
mastodon-87fdd139b890e60f752bf71e3b09d79eaefcf7b5.zip
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/upload.js')
-rw-r--r--app/javascript/mastodon/features/compose/components/upload.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/compose/components/upload.js b/app/javascript/mastodon/features/compose/components/upload.js
index e377da90c..66c93452c 100644
--- a/app/javascript/mastodon/features/compose/components/upload.js
+++ b/app/javascript/mastodon/features/compose/components/upload.js
@@ -14,6 +14,10 @@ const messages = defineMessages({
export default @injectIntl
class Upload extends ImmutablePureComponent {
+ static contextTypes = {
+ router: PropTypes.object,
+ };
+
static propTypes = {
media: ImmutablePropTypes.map.isRequired,
intl: PropTypes.object.isRequired,
@@ -37,7 +41,7 @@ class Upload extends ImmutablePureComponent {
handleSubmit = () => {
this.handleInputBlur();
- this.props.onSubmit();
+ this.props.onSubmit(this.context.router.history);
}
handleUndoClick = () => {