Process incoming federated quotes

Fixes #149
This commit is contained in:
Mouse Reeve 2020-04-20 16:37:53 -07:00
parent 4f568987f5
commit 2d4c2a7ee2

View file

@ -224,11 +224,13 @@ def handle_create(activity):
# we really oughtn't even be sending in this case # we really oughtn't even be sending in this case
return return
if activity['object'].get('fedireadsType') in ['Review', 'Comment'] and \ if activity['object'].get('fedireadsType') and \
'inReplyToBook' in activity['object']: 'inReplyToBook' in activity['object']:
try: try:
if activity['object']['fedireadsType'] == 'Review': if activity['object']['fedireadsType'] == 'Review':
builder = status_builder.create_review_from_activity builder = status_builder.create_review_from_activity
elif activity['object']['fedireadsType'] == 'Quotation':
builder = status_builder.create_quotation_from_activity
else: else:
builder = status_builder.create_comment_from_activity builder = status_builder.create_comment_from_activity