about summary refs log tree commit diff
path: root/app/controllers/auth
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-07-10 10:52:18 +0200
committerGitHub <noreply@github.com>2018-07-10 10:52:18 +0200
commite6647ccf6d13030a91c7e635526e1e40a059ce31 (patch)
treeeda07c40c934ab9a55d7847afe4af3e54bce86b8 /app/controllers/auth
parentc699b2d141d7aa910bd81ae5fe881ecec7039395 (diff)
parent402da8065c2b378cca6361f2c7252bd766f25dde (diff)
Merge pull request #557 from ThibG/glitch-soc/tentative-merge
Merge upstream changes
Diffstat (limited to 'app/controllers/auth')
-rw-r--r--app/controllers/auth/registrations_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb
index c5f43d583..8df8af4c7 100644
--- a/app/controllers/auth/registrations_controller.rb
+++ b/app/controllers/auth/registrations_controller.rb
@@ -40,6 +40,16 @@ class Auth::RegistrationsController < Devise::RegistrationsController
     new_user_session_path
   end
 
+  def after_sign_in_path_for(_resource)
+    set_invite
+
+    if @invite&.autofollow?
+      short_account_path(@invite.user.account)
+    else
+      super
+    end
+  end
+
   def after_inactive_sign_up_path_for(_resource)
     new_user_session_path
   end