about summary refs log tree commit diff
path: root/app/javascript/mastodon/actions/compose.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-09-26 05:46:13 +0200
committerGitHub <noreply@github.com>2021-09-26 05:46:13 +0200
commit52e5c07948c4c91b73062846e1f19ea278ec0e24 (patch)
treeb46b76f919f51ad5a5ac288be2ad2565fa859496 /app/javascript/mastodon/actions/compose.js
parent9c9290768190d412e5b3d65502ee5d0d30596412 (diff)
Change routing paths to use usernames in web UI (#16171)
Diffstat (limited to 'app/javascript/mastodon/actions/compose.js')
-rw-r--r--app/javascript/mastodon/actions/compose.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js
index 39d31a88f..a000a036f 100644
--- a/app/javascript/mastodon/actions/compose.js
+++ b/app/javascript/mastodon/actions/compose.js
@@ -78,7 +78,7 @@ const COMPOSE_PANEL_BREAKPOINT = 600 + (285 * 1) + (10 * 1);
 
 export const ensureComposeIsVisible = (getState, routerHistory) => {
   if (!getState().getIn(['compose', 'mounted']) && window.innerWidth < COMPOSE_PANEL_BREAKPOINT) {
-    routerHistory.push('/statuses/new');
+    routerHistory.push('/publish');
   }
 };
 
@@ -158,7 +158,7 @@ export function submitCompose(routerHistory) {
         'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
       },
     }).then(function (response) {
-      if (routerHistory && routerHistory.location.pathname === '/statuses/new' && window.history.state) {
+      if (routerHistory && routerHistory.location.pathname === '/publish' && window.history.state) {
         routerHistory.goBack();
       }