]> cat aescling's git repositories - mastodon.git/commitdiff
Remove auto-redirect to direct messages in web UI (#15142)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 11 Nov 2020 04:36:22 +0000 (05:36 +0100)
committerGitHub <noreply@github.com>
Wed, 11 Nov 2020 04:36:22 +0000 (05:36 +0100)
app/javascript/mastodon/actions/compose.js

index 030922520264f05e02f9df155d3f3c11bd0c10b1..891403969e2f1d640aed67cce864d5e5b0cbd7f3 100644 (file)
@@ -152,9 +152,7 @@ export function submitCompose(routerHistory) {
         'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
       },
     }).then(function (response) {
-      if (response.data.visibility === 'direct' && getState().getIn(['conversations', 'mounted']) <= 0 && routerHistory) {
-        routerHistory.push('/timelines/direct');
-      } else if (routerHistory && routerHistory.location.pathname === '/statuses/new' && window.history.state) {
+      if (routerHistory && routerHistory.location.pathname === '/statuses/new' && window.history.state) {
         routerHistory.goBack();
       }