diff --git a/src/microcosm/__init__.py b/src/microcosm/__init__.py index 8d2c9b0..f47a56b 100644 --- a/src/microcosm/__init__.py +++ b/src/microcosm/__init__.py @@ -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