Merge commit 'b922ad7a1b4bc8d968d0df2c7f307d4fec53435d' into glitch-soc/merge-upstream
Conflicts: - `package.json`: Upstream changed various script definitions in lines surrounding the one for `i18n:extract`, which had glitch-soc-specific changes. Updated the scripts as upstream did, while keeping our changes to `i18n:extract`.
This commit is contained in:
@ -11,7 +11,7 @@ class Api::V1::ConversationsController < Api::BaseController
|
||||
|
||||
def index
|
||||
@conversations = paginated_conversations
|
||||
render json: @conversations, each_serializer: REST::ConversationSerializer
|
||||
render json: @conversations, each_serializer: REST::ConversationSerializer, relationships: StatusRelationshipsPresenter.new(@conversations.map(&:last_status), current_user&.account_id)
|
||||
end
|
||||
|
||||
def read
|
||||
@ -32,7 +32,20 @@ class Api::V1::ConversationsController < Api::BaseController
|
||||
|
||||
def paginated_conversations
|
||||
AccountConversation.where(account: current_account)
|
||||
.to_a_paginated_by_id(limit_param(LIMIT), params_slice(:max_id, :since_id, :min_id))
|
||||
.includes(
|
||||
account: :account_stat,
|
||||
last_status: [
|
||||
:media_attachments,
|
||||
:preview_cards,
|
||||
:status_stat,
|
||||
:tags,
|
||||
{
|
||||
active_mentions: [account: :account_stat],
|
||||
account: :account_stat,
|
||||
},
|
||||
]
|
||||
)
|
||||
.to_a_paginated_by_id(limit_param(LIMIT), **params_slice(:max_id, :since_id, :min_id))
|
||||
end
|
||||
|
||||
def insert_pagination_headers
|
||||
|
Reference in New Issue
Block a user