Merge tag 'v2.6.0rc1' into instance_only_statuses

このコミットが含まれているのは:
Renato "Lond" Cerqueira
2018-10-23 08:32:55 +02:00
コミット fde9668bae
570個のファイルの変更11506行の追加5693行の削除

ファイルの表示

@ -11,7 +11,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
has_many :emojis, serializer: REST::CustomEmojiSerializer
class FieldSerializer < ActiveModel::Serializer
attributes :name, :value
attributes :name, :value, :verified_at
def value
Formatter.instance.format_field(object.account, object.value)

ファイルの表示

@ -0,0 +1,12 @@
# frozen_string_literal: true
class REST::ConversationSerializer < ActiveModel::Serializer
attributes :id, :unread
has_many :participant_accounts, key: :accounts, serializer: REST::AccountSerializer
has_one :last_status, serializer: REST::StatusSerializer
def id
object.id.to_s
end
end

ファイルの表示

@ -36,6 +36,17 @@ class REST::StatusSerializer < ActiveModel::Serializer
!current_user.nil?
end
def visibility
# This visibility is masked behind "private"
# to avoid API changes because there are no
# UX differences
if object.limited_visibility?
'private'
else
object.visibility
end
end
def uri
OStatus::TagManager.instance.uri_for(object)
end
@ -88,7 +99,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
end
def ordered_mentions
object.mentions.to_a.sort_by(&:id)
object.active_mentions.to_a.sort_by(&:id)
end
class ApplicationSerializer < ActiveModel::Serializer