Merge pull request #813 from mouse-reeve/streams-audience

Don't erase entire stream when new status is added
This commit is contained in:
Mouse Reeve 2021-03-28 18:07:41 -07:00 committed by GitHub
commit 8f5e59d1e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ class ActivityStream(ABC):
Q(id=status.user.id) # if the user is the post's author
| Q(following=status.user) # if the user is following the author
)
return audience
return audience.distinct()
def stream_statuses(self, user): # pylint: disable=no-self-use
""" given a user, what statuses should they see on this stream """
@ -131,7 +131,7 @@ class HomeStream(ActivityStream):
return audience.filter(
Q(id=status.user.id) # if the user is the post's author
| Q(following=status.user) # if the user is following the author
)
).distinct()
def stream_statuses(self, user):
return privacy_filter(