Add server-side support for handling posts with a quote policy allowing followers to quote (#36127)
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user