mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 17:41:08 +00:00
When determining privacy, check for unlisted early
If `followers_url` is found in `to`, the post may still be _unlisted_ if `"https://www.w3.org/ns/activitystreams#Public"` appears in `cc`. Hence this should be checked earlier.
This commit is contained in:
parent
193aeff4d2
commit
accb3273f1
1 changed files with 2 additions and 2 deletions
|
@ -260,12 +260,12 @@ class PrivacyField(ActivitypubFieldMixin, models.CharField):
|
|||
|
||||
if to == [self.public]:
|
||||
setattr(instance, self.name, "public")
|
||||
elif self.public in cc:
|
||||
setattr(instance, self.name, "unlisted")
|
||||
elif to == [user.followers_url]:
|
||||
setattr(instance, self.name, "followers")
|
||||
elif cc == []:
|
||||
setattr(instance, self.name, "direct")
|
||||
elif self.public in cc:
|
||||
setattr(instance, self.name, "unlisted")
|
||||
else:
|
||||
setattr(instance, self.name, "followers")
|
||||
return original == getattr(instance, self.name)
|
||||
|
|
Loading…
Reference in a new issue