From f20698000f77e05634c49d1632051f172b4845a8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 14 Jun 2023 09:05:03 +0200 Subject: [PATCH] Fix always redirecting to onboarding in web UI (#25396) --- app/controllers/auth/confirmations_controller.rb | 4 +++- app/javascript/mastodon/features/ui/index.jsx | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb index c57eb946e1..632b624a37 100644 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@ -83,8 +83,10 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController def after_confirmation_path_for(_resource_name, user) if user.created_by_application && truthy_param?(:redirect_to_app) user.created_by_application.confirmation_redirect_uri + elsif user_signed_in? + web_url('start') else - super + new_user_session_path end end end diff --git a/app/javascript/mastodon/features/ui/index.jsx b/app/javascript/mastodon/features/ui/index.jsx index fb43ba9e5e..d40fefb39f 100644 --- a/app/javascript/mastodon/features/ui/index.jsx +++ b/app/javascript/mastodon/features/ui/index.jsx @@ -393,11 +393,6 @@ class UI extends PureComponent { navigator.serviceWorker.addEventListener('message', this.handleServiceWorkerPostMessage); } - // On first launch, redirect to the follow recommendations page - if (signedIn && this.props.firstLaunch) { - this.context.router.history.replace('/start'); - } - if (signedIn) { this.props.dispatch(fetchMarkers()); this.props.dispatch(expandHomeTimeline());