From 79535cb863d2f956bff2af8449f10da4aede4ede Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Fri, 14 Aug 2020 14:09:33 -0500 Subject: [Feature] Add support for unlisted and out-of-body tags --- app/models/status.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/models') diff --git a/app/models/status.rb b/app/models/status.rb index c12e72f10..e568bfed7 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -447,7 +447,7 @@ class Status < ApplicationRecord end def as_tag_timeline(tag, account = nil, local_only = false) - query = timeline_scope(local_only).tagged_with(tag) + query = timeline_scope(local_only, include_unlisted: true).tagged_with(tag) apply_timeline_filters(query, account, local_only) end @@ -544,7 +544,7 @@ class Status < ApplicationRecord private - def timeline_scope(scope = false) + def timeline_scope(scope = false, include_unlisted: false) starting_scope = case scope when :local, true Status.local @@ -555,7 +555,7 @@ class Status < ApplicationRecord else Status end - starting_scope = starting_scope.with_public_visibility.published + starting_scope = include_unlisted ? starting_scope.distributable : starting_scope.with_public_visibility scope != :local_reblogs ? starting_scope.without_reblogs : starting_scope end -- cgit