diff --git a/bookwyrm/models/book.py b/bookwyrm/models/book.py
index 5dece504..e4f1f29b 100644
--- a/bookwyrm/models/book.py
+++ b/bookwyrm/models/book.py
@@ -73,7 +73,10 @@ class Book(ActivitypubMixin, BookWyrmModel):
@property
def alt_text(self):
''' image alt test '''
- return '%s cover (%s)' % (self.title, self.edition_info)
+ text = '%s cover' % self.title
+ if self.edition_info:
+ text += ' (%s)' % self.edition_info
+ return text
def save(self, *args, **kwargs):
''' can't be abstract for query reasons, but you shouldn't USE it '''
diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py
index b3011e00..408cf1c3 100644
--- a/bookwyrm/models/fields.py
+++ b/bookwyrm/models/fields.py
@@ -71,6 +71,9 @@ class ActivitypubFieldMixin:
return
key = self.get_activitypub_field()
+ # TODO: surely there's a better way
+ if instance.__class__.__name__ == 'Boost' and key == 'attributedTo':
+ key = 'actor'
if isinstance(activity.get(key), list):
activity[key] += formatted
else:
diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py
index b358554c..b12173b1 100644
--- a/bookwyrm/models/status.py
+++ b/bookwyrm/models/status.py
@@ -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(
@@ -127,8 +132,8 @@ class Comment(Status):
@property
def pure_content(self):
''' indicate the book in question for mastodon (or w/e) users '''
- return self.content + '
(comment on "%s")' % \
- (self.book.remote_id, self.book.title)
+ return '
%s
(comment on "%s")
' % \ + (self.content, self.book.remote_id, self.book.title) activity_serializer = activitypub.Comment pure_type = 'Note' @@ -143,7 +148,7 @@ class Quotation(Status): @property def pure_content(self): ''' indicate the book in question for mastodon (or w/e) users ''' - return '"%s""%s"
-- "%s"
%s
' % ( self.quote, self.book.remote_id, self.book.title, @@ -184,8 +189,7 @@ class Review(Status): @property def pure_content(self): ''' indicate the book in question for mastodon (or w/e) users ''' - return self.content + '