Add references activitypub support
This commit is contained in:
parent
4c65f2721c
commit
cadfbbab96
8 changed files with 115 additions and 5 deletions
|
@ -45,6 +45,7 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
create_edits!
|
||||
end
|
||||
|
||||
update_references!
|
||||
download_media_files!
|
||||
queue_poll_notifications!
|
||||
|
||||
|
@ -240,6 +241,13 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
end
|
||||
end
|
||||
|
||||
def update_references!
|
||||
references = @json['references'].nil? ? [] : ActivityPub::FetchReferencesService.new.call(@json['references'])
|
||||
quote = @json['quote'] || @json['quoteUrl'] || @json['quoteURL'] || @json['_misskey_quote']
|
||||
references << quote if quote
|
||||
ProcessReferencesWorker.perform_async(@status.id, [], references)
|
||||
end
|
||||
|
||||
def expected_type?
|
||||
equals_or_includes_any?(@json['type'], %w(Note Question))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue