mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Hiding blurblogs from people who have not shared any stories.
This commit is contained in:
parent
a01f451c80
commit
fb6e3218ba
1 changed files with 6 additions and 1 deletions
|
@ -651,7 +651,9 @@ class MSocialSubscription(mongo.Document):
|
|||
@classmethod
|
||||
def feeds(cls, *args, **kwargs):
|
||||
user_id = kwargs['user_id']
|
||||
params = dict(user_id=user_id)
|
||||
params = {
|
||||
'user_id': user_id,
|
||||
}
|
||||
if 'subscription_user_id' in kwargs:
|
||||
params["subscription_user_id"] = kwargs["subscription_user_id"]
|
||||
social_subs = cls.objects.filter(**params)
|
||||
|
@ -667,6 +669,9 @@ class MSocialSubscription(mongo.Document):
|
|||
# Fetch user profiles of subscriptions
|
||||
social_profiles = MSocialProfile.profile_feeds(social_user_ids)
|
||||
for user_id, social_sub in social_subs.items():
|
||||
if social_profiles[user_id]['shared_stories_count'] <= 0:
|
||||
continue
|
||||
|
||||
# Combine subscription read counts with feed/user info
|
||||
feed = dict(social_sub.items() + social_profiles[user_id].items())
|
||||
social_feeds.append(feed)
|
||||
|
|
Loading…
Add table
Reference in a new issue