From 62bcdc41fc113af0111307b0a232789748c839fa Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 5 Jun 2026 09:54:55 +0200 Subject: [PATCH] Allow `authorized_interactions` endpoint to handle Collections (#39287) --- app/controllers/authorize_interactions_controller.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/authorize_interactions_controller.rb b/app/controllers/authorize_interactions_controller.rb index 03cad3e317..a1adf0e493 100644 --- a/app/controllers/authorize_interactions_controller.rb +++ b/app/controllers/authorize_interactions_controller.rb @@ -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