Add support for local quote stamps (#35626)

This commit is contained in:
Claire 2025-08-01 16:55:25 +02:00 committed by GitHub
parent 483da67204
commit 591df1f205
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 241 additions and 16 deletions

View file

@ -37,6 +37,7 @@ class Quote < ApplicationRecord
before_validation :set_accounts
before_validation :set_activity_uri, only: :create, if: -> { account.local? && quoted_account&.remote? }
validates :activity_uri, presence: true, if: -> { account.local? && quoted_account&.remote? }
validates :approval_uri, absence: true, if: -> { quoted_account&.local? }
validate :validate_visibility
def accept!