]>
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
6 rescue_from Addressable
::URI::InvalidURIError, with
: :handle_invalid_uri
9 if uri
.scheme
== 'web+mastodon
'
12 return redirect_to authorize_interaction_path(uri: uri.query_values['uri
'].gsub(/\Aacct:/, ''))
14 return redirect_to share_path(text: uri.query_values['text
'])
24 not_found if uri.blank?
27 def handle_invalid_uri
32 @uri ||= Addressable::URI.parse(params[:uri])
This page took 0.069635 seconds and 4 git commands to generate.