Post update/delete also fanout to those who liked/boosted it but not following the author (#684)

This commit is contained in:
Henri Dickson 2023-12-31 13:06:30 -05:00 committed by GitHub
parent 74b3ac551a
commit 798222dcdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -765,6 +765,9 @@ class Post(StatorModel):
targets = set()
for mention in self.mentions.all():
targets.add(mention)
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(