logo

mastofe

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

intents_controller.rb (446B)


  1. # frozen_string_literal: true
  2. class IntentsController < ApplicationController
  3. def show
  4. uri = Addressable::URI.parse(params[:uri])
  5. if uri.scheme == 'web+mastodon'
  6. case uri.host
  7. when 'follow'
  8. return redirect_to authorize_follow_path(acct: uri.query_values['uri'].gsub(/\Aacct:/, ''))
  9. when 'share'
  10. return redirect_to share_path(text: uri.query_values['text'])
  11. end
  12. end
  13. not_found
  14. end
  15. end