mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add API endpoints to view and revoke one's quoted posts (#35578)
This commit is contained in:
7
app/policies/quote_policy.rb
Normal file
7
app/policies/quote_policy.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class QuotePolicy < ApplicationPolicy
|
||||
def revoke?
|
||||
record.quoted_account_id.present? && record.quoted_account_id == current_account&.id
|
||||
end
|
||||
end
|
||||
@@ -36,6 +36,10 @@ class StatusPolicy < ApplicationPolicy
|
||||
owned?
|
||||
end
|
||||
|
||||
def list_quotes?
|
||||
owned?
|
||||
end
|
||||
|
||||
alias unreblog? destroy?
|
||||
|
||||
def update?
|
||||
|
||||
Reference in New Issue
Block a user