mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 00:38:27 +00:00
Merge commit '3205a654caf903002c2db872f802a3332201678b' into glitch-soc/merge-upstream
This commit is contained in:
@@ -4,12 +4,13 @@ class ActivityPub::Parser::StatusParser
|
||||
include JsonLdHelper
|
||||
|
||||
# @param [Hash] json
|
||||
# @param [Hash] magic_values
|
||||
# @option magic_values [String] :followers_collection
|
||||
def initialize(json, magic_values = {})
|
||||
@json = json
|
||||
@object = json['object'] || json
|
||||
@magic_values = magic_values
|
||||
# @param [Hash] options
|
||||
# @option options [String] :followers_collection
|
||||
# @option options [Hash] :object
|
||||
def initialize(json, **options)
|
||||
@json = json
|
||||
@object = options[:object] || json['object'] || json
|
||||
@options = options
|
||||
end
|
||||
|
||||
def uri
|
||||
@@ -78,7 +79,7 @@ class ActivityPub::Parser::StatusParser
|
||||
:public
|
||||
elsif audience_cc.any? { |cc| ActivityPub::TagManager.instance.public_collection?(cc) }
|
||||
:unlisted
|
||||
elsif audience_to.include?(@magic_values[:followers_collection])
|
||||
elsif audience_to.include?(@options[:followers_collection])
|
||||
:private
|
||||
elsif direct_message == false
|
||||
:limited
|
||||
|
||||
Reference in New Issue
Block a user