Merge pull request #8363 from cmrd-senya/fix-api-tags-stream-to-hide-ignores

API: update Search endpoint to be aware of ignored users
This commit is contained in:
Benjamin Neff
2024-06-05 01:05:36 +02:00
4 changed files with 47 additions and 11 deletions

View File

@@ -87,11 +87,9 @@ module Api
end
def posts_query
if private_read?
Stream::Tag.new(current_user, params.require(:tag)).posts
else
Stream::Tag.new(nil, params.require(:tag)).posts
end
opts = {}
opts[:public_only] = !private_read?
Stream::Tag.new(current_user, params.require(:tag), opts).stream_posts
end
def tags_query