commit
4fda5c8e22
68 changed files with 1140 additions and 1755 deletions
|
@ -91,6 +91,11 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
|||
to write this so it's just a property '''
|
||||
return cls.objects.filter(reply_parent=status).select_subclasses()
|
||||
|
||||
@property
|
||||
def status_type(self):
|
||||
''' expose the type of status for the ui using activity type '''
|
||||
return self.activity_serializer.__name__
|
||||
|
||||
def to_replies(self, **kwargs):
|
||||
''' helper function for loading AP serialized replies to a status '''
|
||||
return self.to_ordered_collection(
|
||||
|
@ -211,7 +216,7 @@ class Boost(Status):
|
|||
ActivityMapping('object', 'boosted_status'),
|
||||
]
|
||||
|
||||
activity_serializer = activitypub.Like
|
||||
activity_serializer = activitypub.Boost
|
||||
|
||||
# This constraint can't work as it would cross tables.
|
||||
# class Meta:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue