Merge remote-tracking branch 'parent/main' into upstream-20240403

This commit is contained in:
KMY 2024-04-03 12:12:09 +09:00
commit 479c4fecc1
63 changed files with 831 additions and 391 deletions

View file

@ -56,6 +56,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
accounts: {
max_featured_tags: FeaturedTag::LIMIT,
max_pinned_statuses: StatusPinValidator::PIN_LIMIT,
},
statuses: {

View file

@ -3,6 +3,8 @@
class REST::MediaAttachmentSerializer < ActiveModel::Serializer
include RoutingHelper
# Please update `app/javascript/mastodon/api_types/media_attachments.ts` when making changes to the attributes
attributes :id, :type, :url, :preview_url,
:remote_url, :preview_remote_url, :text_url, :meta,
:description, :blurhash

View file

@ -9,8 +9,8 @@ class REST::NotificationPolicySerializer < ActiveModel::Serializer
def summary
{
pending_requests_count: object.pending_requests_count.to_s,
pending_notifications_count: object.pending_notifications_count.to_s,
pending_requests_count: object.pending_requests_count.to_i,
pending_notifications_count: object.pending_notifications_count.to_i,
}
end
end

View file

@ -1,6 +1,8 @@
# frozen_string_literal: true
class REST::PollSerializer < ActiveModel::Serializer
# Please update `app/javascript/mastodon/api_types/polls.ts` when making changes to the attributes
attributes :id, :expires_at, :expired,
:multiple, :votes_count, :voters_count

View file

@ -3,6 +3,8 @@
class REST::StatusSerializer < ActiveModel::Serializer
include FormattingHelper
# Please update `app/javascript/mastodon/api_types/statuses.ts` when making changes to the attributes
attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id,
:sensitive, :spoiler_text, :visibility, :visibility_ex, :limited_scope, :language,
:uri, :url, :replies_count, :reblogs_count, :searchability, :markdown,