Re-enable community filtering for logged-in users
Restores the user's community preference filtering that was temporarily disabled to fix an urgent feed issue for logged-in users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
35
app.py
35
app.py
@@ -449,24 +449,23 @@ def api_posts():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Apply user's community preferences (before filterset)
|
# Apply user's community preferences (before filterset)
|
||||||
# Temporarily disabled to fix urgent feed issue for logged in users
|
if user_communities:
|
||||||
# if user_communities:
|
post_source = post_data.get('source', '').lower()
|
||||||
# post_source = post_data.get('source', '').lower()
|
post_platform = post_data.get('platform', '').lower()
|
||||||
# post_platform = post_data.get('platform', '').lower()
|
|
||||||
#
|
# Check if this post matches any of the user's selected communities
|
||||||
# # Check if this post matches any of the user's selected communities
|
matches_community = False
|
||||||
# matches_community = False
|
for selected_community in user_communities:
|
||||||
# for selected_community in user_communities:
|
selected_community = selected_community.lower()
|
||||||
# selected_community = selected_community.lower()
|
# Match by exact source name or platform name
|
||||||
# # Match by exact source name or platform name
|
if (post_source == selected_community or
|
||||||
# if (post_source == selected_community or
|
post_platform == selected_community or
|
||||||
# post_platform == selected_community or
|
selected_community in post_source):
|
||||||
# selected_community in post_source):
|
matches_community = True
|
||||||
# matches_community = True
|
break
|
||||||
# break
|
|
||||||
#
|
if not matches_community:
|
||||||
# if not matches_community:
|
continue
|
||||||
# continue
|
|
||||||
|
|
||||||
# Apply search filter (before filterset)
|
# Apply search filter (before filterset)
|
||||||
if search_query:
|
if search_query:
|
||||||
|
|||||||
Reference in New Issue
Block a user