Merge pull request #603 from evanminto/activitypub-account
Expose ActivityStreams 2.0 representation of accountsth-downstream
commit
7037774d6e
@ -0,0 +1,8 @@
|
||||
extends 'activitypub/types/person.activitystreams2.rabl'
|
||||
|
||||
object @account
|
||||
|
||||
attributes display_name: :name, username: :preferredUsername, note: :summary
|
||||
|
||||
node(:icon) { |account| full_asset_url(account.avatar.url(:original)) }
|
||||
node(:image) { |account| full_asset_url(account.header.url(:original)) }
|
@ -0,0 +1 @@
|
||||
node(:'@context') { 'https://www.w3.org/ns/activitystreams' }
|
@ -0,0 +1,3 @@
|
||||
extends 'activitypub/base.activitystreams2.rabl'
|
||||
|
||||
node(:id) { request.original_url }
|
@ -0,0 +1,3 @@
|
||||
extends 'activitypub/intransient.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'Person' }
|
@ -1,4 +1,5 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest application/jrd+json )
|
||||
Mime::Type.register "text/xml", :xml, %w( application/xml application/atom+xml application/xrd+xml )
|
||||
Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest application/jrd+json )
|
||||
Mime::Type.register "text/xml", :xml, %w( application/xml application/atom+xml application/xrd+xml )
|
||||
Mime::Type.register "application/activity+json", :activitystreams2
|
||||
|
Loading…
Reference in new issue