Merge commit 'fd284311e7
' into kb_migration
This commit is contained in:
commit
287eacf5f3
400 changed files with 4667 additions and 5387 deletions
|
@ -5,9 +5,8 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
include FormattingHelper
|
||||
|
||||
attributes :id, :username, :acct, :display_name, :locked, :bot, :discoverable, :group, :created_at,
|
||||
:note, :url, :avatar, :avatar_static, :header, :header_static, :subscribable,
|
||||
:followers_count, :following_count, :statuses_count, :last_status_at, :other_settings,
|
||||
:noindex
|
||||
:note, :url, :uri, :avatar, :avatar_static, :header, :header_static, :subscribable,
|
||||
:followers_count, :following_count, :statuses_count, :last_status_at, :other_settings, :noindex
|
||||
|
||||
has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested?
|
||||
|
||||
|
@ -66,6 +65,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
ActivityPub::TagManager.instance.url_for(object)
|
||||
end
|
||||
|
||||
def uri
|
||||
ActivityPub::TagManager.instance.uri_for(object)
|
||||
end
|
||||
|
||||
def avatar
|
||||
full_asset_url(object.suspended? ? object.avatar.default_url : object.avatar_original_url)
|
||||
end
|
||||
|
|
|
@ -15,8 +15,4 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer
|
|||
def html
|
||||
Sanitize.fragment(object.html, Sanitize::Config::MASTODON_OEMBED)
|
||||
end
|
||||
|
||||
def published_at
|
||||
object.created_at
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,6 +22,7 @@ class WebfingerSerializer < ActiveModel::Serializer
|
|||
[
|
||||
{ rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: about_more_url(instance_actor: true) },
|
||||
{ rel: 'self', type: 'application/activity+json', href: instance_actor_url },
|
||||
{ rel: 'http://ostatus.org/schema/1.0/subscribe', template: "#{authorize_interaction_url}?uri={uri}" },
|
||||
]
|
||||
else
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue