1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-01 08:18:53 +09:00

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.
This commit is contained in:
Drew DeVault 2017-04-04 20:16:14 -04:00
parent bda37489ac
commit f7e35d90db

View File

@ -8,6 +8,7 @@ class RemoteFollowController < ApplicationController
def new def new
@remote_follow = RemoteFollow.new @remote_follow = RemoteFollow.new
@remote_follow.acct = session[:remote_follow] if session.key?(:remote_follow)
end end
def create def create
@ -22,6 +23,8 @@ class RemoteFollowController < ApplicationController
render(:new) && return render(:new) && return
end 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 redirect_to Addressable::Template.new(redirect_url_link.template).expand(uri: "#{@account.username}@#{Rails.configuration.x.local_domain}").to_s
else else
render :new render :new