Merge remote-tracking branch 'origin/features/main' into features/quote

This commit is contained in:
2024-02-04 11:40:23 +09:00
61 changed files with 770 additions and 238 deletions

View File

@@ -11,6 +11,8 @@ class Api::V1::Timelines::HomeController < Api::V1::Timelines::BaseController
@statuses = load_statuses
@relationships = StatusRelationshipsPresenter.new(@statuses, current_user&.account_id)
accounts = @statuses.filter_map { |status| status.quote&.account }.uniq
account_ids = @statuses.filter(&:quote?).map { |status| status.quote.account_id }.uniq
@account_relationships = AccountRelationshipsPresenter.new(accounts, current_user&.account_id)
end

View File

@@ -10,6 +10,7 @@ class Api::V1::Timelines::ListController < Api::V1::Timelines::BaseController
def show
accounts = @statuses.filter_map { |status| status.quote&.account }.uniq
account_ids = @statuses.filter(&:quote?).map { |status| status.quote.account_id }.uniq
render json: @statuses,
each_serializer: REST::StatusSerializer,

View File

@@ -9,6 +9,7 @@ class Api::V1::Timelines::PublicController < Api::V1::Timelines::BaseController
cache_if_unauthenticated!
@statuses = load_statuses
accounts = @statuses.filter_map { |status| status.quote&.account }.uniq
account_ids = @statuses.filter(&:quote?).map { |status| status.quote.account_id }.uniq
render json: @statuses, each_serializer: REST::StatusSerializer,
relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id),

View File

@@ -10,6 +10,7 @@ class Api::V1::Timelines::TagController < Api::V1::Timelines::BaseController
cache_if_unauthenticated!
@statuses = load_statuses
accounts = @statuses.filter_map { |status| status.quote&.account }.uniq
account_ids = @statuses.filter(&:quote?).map { |status| status.quote.account_id }.uniq
render json: @statuses, each_serializer: REST::StatusSerializer,
relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id),