Fix template and improve threads

This commit is contained in:
Thomas Sileo
2019-09-01 14:19:33 +02:00
parent 1ab8920df8
commit 3a141795e6
2 changed files with 29 additions and 3 deletions

View File

@@ -142,7 +142,9 @@ def _get_ip():
def _build_thread(data, include_children=True): # noqa: C901
data["_requested"] = True
app.logger.info(f"_build_thread({data!r})")
root_id = data["meta"][MetaKey.OBJECT_ID.value]
root_id = data["meta"].get(
MetaKey.THREAD_ROOT_PARENT.value, data["meta"][MetaKey.OBJECT_ID.value]
)
replies = [data]
for dat in find_activities(