LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.27k stars 885 forks source link

[Bug]: Hidden Communities are not Hidden #5074

Closed Ategon closed 3 weeks ago

Ategon commented 1 month ago

Requirements

Summary

When a community is marked as hidden posts will still appear in the all feed even when people are not subscribed

This was not the case on 0.19.3 and is a recent bug to .4 and .5 (im assuming due to the hide post feature)

Steps to Reproduce

  1. Mark a community as hidden in the database (that you are not subscribed to)
  2. Have another account make a post in that community
  3. Check the all feed
  4. The post will be there

Technical Details

No errors, running on a debian server

Version

0.19.5

Lemmy Instance URL

programming.dev

Nutomic commented 1 month ago

Do you mean community.hidden in the db? There is a switch on the frontpage for "show hidden posts" (eye icon next to subscribed/local/all selector), do you have that disabled? Can you tell the exact api call with parameters that returns wrong data? And does the problem happen while logged in or logged out?

Ategon commented 1 month ago

Yes community.hidden

Shows the posts with both settings for the show hidden posts. Its the call the all feed makes which is https://programming.dev/api/v3/post/list?limit=20&sort=New&saved_only=false&type_=All&show_hidden=false

both logged in and out

Nutomic commented 1 month ago

I had a look at the code and added a test case, as far as I can tell this is being handled completely correctly. I also tested this on ds9.lemmy.ml by marking https://ds9.lemmy.ml/c/test_hidden and https://a.gup.pe/u/israel as hidden. Neither of these is showing any posts unless I subscribe first.

You mentioned some problems with database corruption in the chat, maybe the problem is related to that.

dessalines commented 3 weeks ago

Closed then as can't replicate.