Fix signatured post not work
This commit is contained in:
parent
c6302e625e
commit
db6d1f5c75
2 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_status_params
|
def process_status_params
|
||||||
@status_parser = ActivityPub::Parser::StatusParser.new(@json['signature'].present? ? @object : @json, followers_collection: @account.followers_url)
|
@status_parser = ActivityPub::Parser::StatusParser.new(@json, followers_collection: @account.followers_url, object: @object)
|
||||||
|
|
||||||
@params = {
|
@params = {
|
||||||
uri: @status_parser.uri,
|
uri: @status_parser.uri,
|
||||||
|
|
|
@ -8,7 +8,7 @@ class ActivityPub::Parser::StatusParser
|
||||||
# @option magic_values [String] :followers_collection
|
# @option magic_values [String] :followers_collection
|
||||||
def initialize(json, magic_values = {})
|
def initialize(json, magic_values = {})
|
||||||
@json = json
|
@json = json
|
||||||
@object = json['object'] || json
|
@object = magic_values[:object] || json['object'] || json
|
||||||
@magic_values = magic_values
|
@magic_values = magic_values
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue