logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

remote_account_controller_concern.rb (378B)


  1. # frozen_string_literal: true
  2. module RemoteAccountControllerConcern
  3. extend ActiveSupport::Concern
  4. included do
  5. layout 'public'
  6. before_action :set_account
  7. before_action :check_account_suspension
  8. end
  9. private
  10. def set_account
  11. @account = Account.find_remote!(params[:acct])
  12. end
  13. def check_account_suspension
  14. gone if @account.suspended?
  15. end
  16. end