only do so for public and unlisted posts

This commit is contained in:
Henri Dickson 2023-12-27 15:38:08 -05:00 committed by GitHub
parent 76666688d6
commit 33640af49d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -765,8 +765,9 @@ class Post(StatorModel):
targets = set()
for mention in self.mentions.all():
targets.add(mention)
for interaction in self.interactions.all():
targets.add(interaction.identity)
if self.visibility in [Post.Visibilities.public, Post.Visibilities.unlisted]:
for interaction in self.interactions.all():
targets.add(interaction.identity)
# Then, if it's not mentions only, also deliver to followers and all hashtag followers
if self.visibility != Post.Visibilities.mentioned:
for follower in self.author.inbound_follows.filter(