diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py index f37076b5c..3949e09a9 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -303,10 +303,17 @@ class Comment(BookStatus): @property def pure_content(self): """indicate the book in question for mastodon (or w/e) users""" - return ( - f'{self.content}

(comment on ' - f'"{self.book.title}")

' - ) + if self.progress_mode == "PG" and self.progress and (self.progress > 0): + return_value = ( + f'{self.content}

(comment on ' + f'"{self.book.title}", page {self.progress})

' + ) + else: + return_value = ( + f'{self.content}

(comment on ' + f'"{self.book.title}")

' + ) + return return_value activity_serializer = activitypub.Comment @@ -332,10 +339,17 @@ class Quotation(BookStatus): """indicate the book in question for mastodon (or w/e) users""" quote = re.sub(r"^

", '

"', self.quote) quote = re.sub(r"

$", '"

', quote) - return ( - f'{quote}

-- ' - f'"{self.book.title}"

{self.content}' - ) + if self.position_mode == "PG" and self.position and (self.position > 0): + return_value = ( + f'{quote}

-- ' + f'"{self.book.title}", page {self.position}

{self.content}' + ) + else: + return_value = ( + f'{quote}

-- ' + f'"{self.book.title}"

{self.content}' + ) + return return_value activity_serializer = activitypub.Quotation diff --git a/bookwyrm/templates/snippets/status/content_status.html b/bookwyrm/templates/snippets/status/content_status.html index bee4af1dc..d0d385153 100644 --- a/bookwyrm/templates/snippets/status/content_status.html +++ b/bookwyrm/templates/snippets/status/content_status.html @@ -112,6 +112,9 @@ {% with full=status.content|safe no_trim=status.content_warning itemprop="reviewBody" %} {% include 'snippets/trimmed_text.html' %} {% endwith %} + {% if status.progress %} +
{% trans "page" %} {{ status.progress }}
+ {% endif %} {% endif %} {% if status.attachments.exists %}