private
- local_account? && (local_only? || @options[:allow_local_only])
+ attr_reader :account, :options
+
+ def allow_local_only?
++ local_account? && (local_only? || options[:allow_local_only])
+ end
+
def with_reblogs?
- @options[:with_reblogs]
+ options[:with_reblogs]
end
def with_replies?
end
def account?
- @account.present?
+ account.present?
end
- @account&.local?
+ def local_account?
++ account&.local?
+ end
+
def media_only?
- @options[:only_media]
+ options[:only_media]
end
def public_scope
Status.joins(:media_attachments).group(:id)
end
+ def without_local_only_scope
+ Status.not_local_only
+ end
+
def account_filters_scope
- Status.not_excluded_by_account(@account).tap do |scope|
- scope.merge!(Status.not_domain_blocked_by_account(@account)) unless local_only?
- scope.merge!(Status.in_chosen_languages(@account)) if @account.chosen_languages.present?
+ Status.not_excluded_by_account(account).tap do |scope|
+ scope.merge!(Status.not_domain_blocked_by_account(account)) unless local_only?
+ scope.merge!(Status.in_chosen_languages(account)) if account.chosen_languages.present?
end
end
end