Browse Source

When fetching an ActivityPub-enabled status, do not re-request it as text/html (#6196)

pull/4/head
ThibG 6 years ago
committed by Eugen Rochko
parent
commit
a594139115
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/services/fetch_atom_service.rb

+ 2
- 0
app/services/fetch_atom_service.rb View File

@ -46,6 +46,8 @@ class FetchAtomService < BaseService
json = body_to_json(@response.to_s)
if supported_context?(json) && json['type'] == 'Person' && json['inbox'].present?
[json['id'], { prefetched_body: @response.to_s, id: true }, :activitypub]
elsif supported_context?(json) && json['type'] == 'Note'
[json['id'], { prefetched_body: @response.to_s, id: true }, :activitypub]
else
@unsupported_activity = true
nil

Loading…
Cancel
Save