Allow authorized_interactions endpoint to handle Collections (#39287)

This commit is contained in:
Claire 2026-06-05 09:54:55 +02:00 committed by GitHub
parent 4957a4fb50
commit 62bcdc41fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,10 +7,13 @@ class AuthorizeInteractionsController < ApplicationController
before_action :set_resource
def show
if @resource.is_a?(Account)
case @resource
when Account
redirect_to web_url("@#{@resource.pretty_acct}")
elsif @resource.is_a?(Status)
when Status
redirect_to web_url("@#{@resource.account.pretty_acct}/#{@resource.id}")
when Collection
redirect_to web_url("collections/#{resource.id}")
else
not_found
end