about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-14 14:09:33 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:18 -0500
commit79535cb863d2f956bff2af8449f10da4aede4ede (patch)
treec609880ad160a4a8105f8076a1139d63884a83c1 /app/models
parente3b316dd3e797a9c266fc1ec5e104845df1da9c6 (diff)
[Feature] Add support for unlisted and out-of-body tags
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb6
1 files changed, 3 insertions, 3 deletions
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