Fix change breaking sharekey functionality
parent
8b96e669e9
commit
4c146300ff
|
@ -67,7 +67,13 @@ class StatusesController < ApplicationController
|
|||
|
||||
def set_status
|
||||
@status = @account.statuses.find(params[:id])
|
||||
authorize @status, :show?
|
||||
@sharekey = params[:key]
|
||||
|
||||
if @status.sharekey.present? && @sharekey == @status.sharekey.key
|
||||
skip_authorization
|
||||
else
|
||||
authorize @status, :show?
|
||||
end
|
||||
rescue Mastodon::NotPermittedError
|
||||
raise ActiveRecord::RecordNotFound
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue