From ee067b7d65dbaebeb6995f643fc4366c7a52e215 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 26 Mar 2021 12:09:37 -0700 Subject: [PATCH] Fixes error adding unlisted statuses --- bookwyrm/activitystreams.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/activitystreams.py b/bookwyrm/activitystreams.py index 88f1f011..6fa36700 100644 --- a/bookwyrm/activitystreams.py +++ b/bookwyrm/activitystreams.py @@ -88,7 +88,7 @@ class ActivityStream(ABC): """ given a status, what users should see it """ # direct messages don't appeard in feeds, direct comments/reviews/etc do if status.privacy == "direct" and status.status_type == "Note": - return None + return [] # everybody who could plausibly see this status audience = models.User.objects.filter( @@ -150,7 +150,7 @@ class LocalStream(ActivityStream): def stream_users(self, status): # this stream wants no part in non-public statuses if status.privacy != "public" or not status.user.local: - return None + return [] return super().stream_users(status) def stream_statuses(self, user): @@ -170,7 +170,7 @@ class FederatedStream(ActivityStream): def stream_users(self, status): # this stream wants no part in non-public statuses if status.privacy != "public": - return None + return [] return super().stream_users(status) def stream_statuses(self, user):