Serialize lists as custom activitypub object
This commit is contained in:
parent
d37f8f68d8
commit
e61d8b7638
7 changed files with 53 additions and 27 deletions
|
@ -130,6 +130,7 @@ class ActivityObject:
|
|||
def serialize(self):
|
||||
''' convert to dictionary with context attr '''
|
||||
data = self.__dict__
|
||||
data = {k:v for (k, v) in data.items() if v is not None}
|
||||
data['@context'] = 'https://www.w3.org/ns/activitystreams'
|
||||
return data
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue