28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'app/models/newsmast_mastodon/concerns/public_feed_concern.rb', line 28
def get(limit, max_id = nil, since_id = nil, min_id = nil)
return [] if incompatible_feed_settings?
scope = public_scope
scope.merge!(without_replies_scope) unless with_replies?
scope.merge!(without_reblogs_scope) unless with_reblogs? || ENV['LOCAL_DOMAIN'] == 'thebristolcable.social'
scope.merge!(local_only_scope) if local_only?
scope.merge!(remote_only_scope) if remote_only?
scope.merge!(account_filters_scope) if account?
scope.merge!(media_only_scope) if media_only?
scope.merge!(grouped_admin_statuses_scope) if grouped_admin_statuses?
scope.merge!(grouped_admin_reblogged_statuses_scope) if grouped_admin_statuses?
scope.merge!(language_scope) if account&.chosen_languages.present?
scope = apply_filters(scope)
scope.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
end
|