Skip to content

Commit 62bcdc4

Browse files
Allow authorized_interactions endpoint to handle Collections (mastodon#39287)
1 parent 4957a4f commit 62bcdc4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/controllers/authorize_interactions_controller.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ class AuthorizeInteractionsController < ApplicationController
77
before_action :set_resource
88

99
def show
10-
if @resource.is_a?(Account)
10+
case @resource
11+
when Account
1112
redirect_to web_url("@#{@resource.pretty_acct}")
12-
elsif @resource.is_a?(Status)
13+
when Status
1314
redirect_to web_url("@#{@resource.account.pretty_acct}/#{@resource.id}")
15+
when Collection
16+
redirect_to web_url("collections/#{resource.id}")
1417
else
1518
not_found
1619
end

0 commit comments

Comments
 (0)