Add API endpoints to view and revoke one's quoted posts (#35578)

This commit is contained in:
Claire
2025-07-31 11:36:51 +02:00
committed by GitHub
parent 572a0e128d
commit 2dfdcc7dcb
10 changed files with 324 additions and 0 deletions

View 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

View File

@@ -36,6 +36,10 @@ class StatusPolicy < ApplicationPolicy
owned?
end
def list_quotes?
owned?
end
alias unreblog? destroy?
def update?