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
|
||||
|
||||
# Apply user's community preferences (before filterset)
|
||||
# Temporarily disabled to fix urgent feed issue for logged in users
|
||||
# if user_communities:
|
||||
# post_source = post_data.get('source', '').lower()
|
||||
# post_platform = post_data.get('platform', '').lower()
|
||||
#
|
||||
# # Check if this post matches any of the user's selected communities
|
||||
# matches_community = False
|
||||
# for selected_community in user_communities:
|
||||
# selected_community = selected_community.lower()
|
||||
# # Match by exact source name or platform name
|
||||
# if (post_source == selected_community or
|
||||
# post_platform == selected_community or
|
||||
# selected_community in post_source):
|
||||
# matches_community = True
|
||||
# break
|
||||
#
|
||||
# if not matches_community:
|
||||
# continue
|
||||
if user_communities:
|
||||
post_source = post_data.get('source', '').lower()
|
||||
post_platform = post_data.get('platform', '').lower()
|
||||
|
||||
# Check if this post matches any of the user's selected communities
|
||||
matches_community = False
|
||||
for selected_community in user_communities:
|
||||
selected_community = selected_community.lower()
|
||||
# Match by exact source name or platform name
|
||||
if (post_source == selected_community or
|
||||
post_platform == selected_community or
|
||||
selected_community in post_source):
|
||||
matches_community = True
|
||||
break
|
||||
|
||||
if not matches_community:
|
||||
continue
|
||||
|
||||
# Apply search filter (before filterset)
|
||||
if search_query:
|
||||
|
||||
Reference in New Issue
Block a user