Support multiple possible fields that indicate user ownership
This commit is contained in:
@ -226,7 +226,8 @@ class PrivacyField(ActivitypubFieldMixin, models.CharField):
|
||||
cc = data.cc
|
||||
|
||||
# we need to figure out who this is to get their followers link
|
||||
user = activitypub.resolve_remote_id(data.attributedTo, model="User")
|
||||
user_field = "attributedTo" if hasattr(data, "attributedTo") else "owner"
|
||||
user = activitypub.resolve_remote_id(getattr(data, user_field), model="User")
|
||||
|
||||
if to == [self.public]:
|
||||
setattr(instance, self.name, "public")
|
||||
|
Reference in New Issue
Block a user