2
0

Add server-side support for handling posts with a quote policy allowing followers to quote (#36127)

This commit is contained in:
Claire
2025-09-15 17:03:44 +02:00
committed by GitHub
parent f5591346cc
commit e4bb0fc43a
5 changed files with 17 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ class ActivityPub::Parser::StatusParser
# @param [Hash] json
# @param [Hash] options
# @option options [String] :followers_collection
# @option options [String] :following_collection
# @option options [String] :actor_uri
# @option options [Hash] :object
def initialize(json, **options)
@@ -146,8 +147,7 @@ class ActivityPub::Parser::StatusParser
flags |= Status::QUOTE_APPROVAL_POLICY_FLAGS[:public] if allowed_actors.delete('as:Public') || allowed_actors.delete('Public') || allowed_actors.delete('https://www.w3.org/ns/activitystreams#Public')
flags |= Status::QUOTE_APPROVAL_POLICY_FLAGS[:followers] if allowed_actors.delete(@options[:followers_collection])
# TODO: we don't actually store that collection URI
# flags |= Status::QUOTE_APPROVAL_POLICY_FLAGS[:followed]
flags |= Status::QUOTE_APPROVAL_POLICY_FLAGS[:following] if allowed_actors.delete(@options[:following_collection])
# Remove the special-meaning actor URI
allowed_actors.delete(@options[:actor_uri])