mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
blocking an instance hides communities too
This commit is contained in:
parent
841174619c
commit
04a68a4298
1 changed files with 3 additions and 0 deletions
|
@ -199,6 +199,9 @@ def list_communities():
|
|||
communities = communities.filter(Community.nsfw == False)
|
||||
if current_user.hide_nsfl == 1:
|
||||
communities = communities.filter(Community.nsfl == False)
|
||||
instance_ids = blocked_instances(current_user.id)
|
||||
if instance_ids:
|
||||
communities = communities.filter(or_(Community.instance_id.not_in(instance_ids), Community.instance_id == None))
|
||||
else:
|
||||
communities = communities.filter(and_(Community.nsfw == False, Community.nsfl == False))
|
||||
|
||||
|
|
Loading…
Reference in a new issue