1
0
Fork 0

Store book data

This commit is contained in:
Mouse Reeve 2020-03-06 22:56:44 -08:00
parent e45b04f22e
commit d501e707ee
18 changed files with 380 additions and 100 deletions

View file

@ -126,7 +126,7 @@ def handle_shelve(user, book, shelf):
'read': 'finished reading'
}[shelf.identifier]
name = user.name if user.name else user.localname
message = '%s %s %s' % (name, verb, book.data['title'])
message = '%s %s %s' % (name, verb, book.title)
status = create_status(user, message, mention_books=[book])
activity = activitypub.get_status(status)
@ -150,7 +150,7 @@ def handle_unshelve(user, book, shelf):
def handle_review(user, book, name, content, rating):
''' post a review '''
# validated and saves the review in the database so it has an id
review = create_review(user, book, name, content, rating)
review = create_review(user, book, name, content, rating, None)
review_activity = activitypub.get_review(review)
review_create_activity = activitypub.get_create(user, review_activity)