Tweak threads for ghost replies

This commit is contained in:
Thomas Sileo 2018-07-26 23:11:38 +02:00
parent 140d7c5b5b
commit e3b8c4f63c

5
app.py
View file

@ -902,7 +902,10 @@ def _build_thread(data, include_children=True):
if rep_id == root_id:
continue
reply_of = rep["activity"]["object"]["inReplyTo"]
idx[reply_of]["_nodes"].append(rep)
try:
idx[reply_of]["_nodes"].append(rep)
except KeyError:
app.logger.info(f"{reply_of} is not there! skipping {rep}")
# Flatten the tree
thread = []