minor code cleanup and commenting

This commit is contained in:
Mouse Reeve
2020-02-07 15:11:53 -08:00
parent ef2209e77b
commit 3998c662cc
6 changed files with 76 additions and 49 deletions

View File

@ -65,6 +65,7 @@ def handle_outgoing_follow(user, to_follow):
errors = broadcast(user, activity, [to_follow.inbox])
for error in errors:
# TODO: following masto users is returning 400
raise(error['error'])
@ -166,10 +167,11 @@ def handle_review(user, book, name, content, rating):
'published': datetime.utcnow().isoformat(),
'attributedTo': user.actor,
'content': content,
'inReplyTo': book.openlibrary_key,
'inReplyTo': book.openlibrary_key, # TODO is this the right identifier?
'rating': rating, # fedireads-only custom field
'to': 'https://www.w3.org/ns/activitystreams#Public'
}
# TODO: create alt version for mastodon
recipients = get_recipients(user, 'public')
create_uuid = uuid4()
activity = {