add annotation type
continuous-integration/drone/push Build is failing Details

This commit is contained in:
James Ravenscroft 2022-11-26 06:45:29 +00:00
parent 01a80a6fc2
commit db34ff3d37
1 changed files with 5 additions and 1 deletions

View File

@ -200,7 +200,10 @@ def detect_entry_type(doc: dict) -> str:
"""Given a dictionary object from either form or json, detect type of post"""
if ('in-reply-to' in doc) or ('u-in-reply-to' in doc):
if 'hypothesis-link' in doc:
entry_type = "annotation"
elif ('in-reply-to' in doc) or ('u-in-reply-to' in doc):
entry_type = "reply"
elif ('bookmark-of' in doc) or ('u-bookmark-of' in doc):
@ -220,6 +223,7 @@ def detect_entry_type(doc: dict) -> str:
entry_type = "post"
else:
entry_type = "note"
return entry_type