Disable boosting private statuses

This commit is contained in:
Mouse Reeve
2020-12-18 09:30:08 -08:00
parent ee8e46ca52
commit 40c4f4f5de
3 changed files with 12 additions and 2 deletions

View File

@ -59,6 +59,11 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
''' expose the type of status for the ui using activity type '''
return self.activity_serializer.__name__
@property
def boostable(self):
''' you can't boost dms '''
return self.privacy in ['unlisted', 'public']
def to_replies(self, **kwargs):
''' helper function for loading AP serialized replies to a status '''
return self.to_ordered_collection(