]>
cat aescling's git repositories - mastodon.git/blob - app/controllers/intents_controller.rb
1 # frozen_string_literal: true
3 class IntentsController
< ApplicationController
4 before_action
:check_uri
5 rescue_from Addressable
::URI::InvalidURIError, with
: :handle_invalid_uri
8 if uri
.scheme
== 'web+mastodon
'
11 return redirect_to authorize_interaction_path(uri: uri.query_values['uri
'].gsub(/\Aacct:/, ''))
13 return redirect_to share_path(text: uri.query_values['text
'])
23 not_found if uri.blank?
26 def handle_invalid_uri
31 @uri ||= Addressable::URI.parse(params[:uri])
This page took 0.088128 seconds and 4 git commands to generate.