forked from mirrors/bookwyrm
Handle users without shared_inbox in broadcast
This commit is contained in:
parent
6df9700604
commit
a0323ead33
1 changed files with 4 additions and 2 deletions
|
@ -22,9 +22,11 @@ def get_recipients(user, post_privacy, direct_recipients=None):
|
|||
followers = user.followers.all()
|
||||
if post_privacy == 'public':
|
||||
# post to public shared inboxes
|
||||
shared_inboxes = set(u.shared_inbox for u in followers)
|
||||
shared_inboxes = set(
|
||||
u.shared_inbox for u in followers if u.shared_inbox
|
||||
)
|
||||
recipients += list(shared_inboxes)
|
||||
# TODO: not every user has a shared inbox
|
||||
recipients += [u.inbox for u in followers if not u.shared_inbox]
|
||||
# TODO: direct to anyone who's mentioned
|
||||
if post_privacy == 'followers':
|
||||
# don't send it to the shared inboxes
|
||||
|
|
Loading…
Reference in a new issue