Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
	Gemfile

Solved conflicts by using upstream's line for posix-spawn
This commit is contained in:
Thibaut Girka
2018-05-16 21:52:38 +02:00
62 changed files with 672 additions and 437 deletions

View File

@ -27,19 +27,17 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
end
def account_statuses
default_statuses.tap do |statuses|
statuses.merge!(only_media_scope) if truthy_param?(:only_media)
statuses.merge!(pinned_scope) if truthy_param?(:pinned)
statuses.merge!(no_replies_scope) if truthy_param?(:exclude_replies)
end
end
def default_statuses
permitted_account_statuses.paginate_by_max_id(
statuses = truthy_param?(:pinned) ? pinned_scope : permitted_account_statuses
statuses = statuses.paginate_by_max_id(
limit_param(DEFAULT_STATUSES_LIMIT),
params[:max_id],
params[:since_id]
)
statuses.merge!(only_media_scope) if truthy_param?(:only_media)
statuses.merge!(no_replies_scope) if truthy_param?(:exclude_replies)
statuses
end
def permitted_account_statuses

View File

@ -8,6 +8,8 @@ class MediaProxyController < ApplicationController
if lock.acquired?
@media_attachment = MediaAttachment.remote.find(params[:id])
redownload! if @media_attachment.needs_redownload? && !reject_media?
else
raise Mastodon::RaceConditionError
end
end