Skip to content
Snippets Groups Projects
Commit f7e35d90 authored by Drew DeVault's avatar Drew DeVault
Browse files

Remote follow improvements

This stores the @username@instance you provide in your session and
reuses it the next time you remote follow someone from this instance.
parent bda37489
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ class RemoteFollowController < ApplicationController
def new
@remote_follow = RemoteFollow.new
@remote_follow.acct = session[:remote_follow] if session.key?(:remote_follow)
end
def create
......@@ -22,6 +23,8 @@ class RemoteFollowController < ApplicationController
render(:new) && return
end
session[:remote_follow] = @remote_follow.acct
redirect_to Addressable::Template.new(redirect_url_link.template).expand(uri: "#{@account.username}@#{Rails.configuration.x.local_domain}").to_s
else
render :new
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment