Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/packs/admin.js`: Conflicts due to glitch-soc's theming system. Upstream changes have been ported to `app/javascript/core/admin.js` - `app/models/trends/statuses.rb`: Minor conflict due to glitch-soc's option to allow CWed toots in trends. Ported upstream changes.
This commit is contained in:
@@ -14,7 +14,7 @@ class AuthorizeInteractionsController < ApplicationController
|
||||
if @resource.is_a?(Account)
|
||||
render :show
|
||||
elsif @resource.is_a?(Status)
|
||||
redirect_to web_url("statuses/#{@resource.id}")
|
||||
redirect_to web_url("@#{@resource.account.pretty_acct}/#{@resource.id}")
|
||||
else
|
||||
render :error
|
||||
end
|
||||
@@ -26,15 +26,17 @@ class AuthorizeInteractionsController < ApplicationController
|
||||
else
|
||||
render :error
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render :error
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_resource
|
||||
@resource = located_resource || render(:error)
|
||||
@resource = located_resource
|
||||
authorize(@resource, :show?) if @resource.is_a?(Status)
|
||||
rescue Mastodon::NotPermittedError
|
||||
not_found
|
||||
end
|
||||
|
||||
def located_resource
|
||||
|
||||
@@ -22,7 +22,10 @@ class FollowingAccountsController < ApplicationController
|
||||
end
|
||||
|
||||
format.json do
|
||||
raise Mastodon::NotPermittedError if page_requested? && @account.hide_collections?
|
||||
if page_requested? && @account.hide_collections?
|
||||
forbidden
|
||||
next
|
||||
end
|
||||
|
||||
expires_in(page_requested? ? 0 : 3.minutes, public: public_fetch_mode?)
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
class Oauth::TokensController < Doorkeeper::TokensController
|
||||
def revoke
|
||||
unsubscribe_for_token if authorized? && token.accessible?
|
||||
unsubscribe_for_token if token.present? && authorized? && token.accessible?
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user