Merge pull request #822 from mouse-reeve/activitystream-dm-bug

Fixes error sending dm
This commit is contained in:
Mouse Reeve 2021-03-29 13:21:16 -07:00 committed by GitHub
commit f9477fa8b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,6 +128,8 @@ class HomeStream(ActivityStream):
def stream_users(self, status):
audience = super().stream_users(status)
if not audience:
return []
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