forked from mirrors/bookwyrm
Makes user to_activity serializer args consistent
This commit is contained in:
parent
72c08e8f77
commit
2174ea11ec
1 changed files with 4 additions and 4 deletions
|
@ -182,10 +182,10 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||
**kwargs
|
||||
)
|
||||
|
||||
def to_activity(self):
|
||||
def to_activity(self, **kwargs):
|
||||
"""override default AP serializer to add context object
|
||||
idk if this is the best way to go about this"""
|
||||
activity_object = super().to_activity()
|
||||
activity_object = super().to_activity(**kwargs)
|
||||
activity_object["@context"] = [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://w3id.org/security/v1",
|
||||
|
@ -293,10 +293,10 @@ class KeyPair(ActivitypubMixin, BookWyrmModel):
|
|||
self.private_key, self.public_key = create_key_pair()
|
||||
return super().save(*args, **kwargs)
|
||||
|
||||
def to_activity(self):
|
||||
def to_activity(self, **kwargs):
|
||||
"""override default AP serializer to add context object
|
||||
idk if this is the best way to go about this"""
|
||||
activity_object = super().to_activity()
|
||||
activity_object = super().to_activity(**kwargs)
|
||||
del activity_object["@context"]
|
||||
del activity_object["type"]
|
||||
return activity_object
|
||||
|
|
Loading…
Reference in a new issue