More poll/question tweaks
This commit is contained in:
parent
2a0b348796
commit
1dd7c516ed
3 changed files with 8 additions and 4 deletions
5
app.py
5
app.py
|
@ -929,8 +929,11 @@ def _build_thread(data, include_children=True): # noqa: C901
|
|||
}
|
||||
replies = [data]
|
||||
for dat in DB.activities.find(query):
|
||||
print(dat["type"])
|
||||
if dat["type"][0] == ActivityType.CREATE.value:
|
||||
replies.append(dat)
|
||||
if dat["type"][0] == ActivityType.UPDATE.value:
|
||||
continue
|
||||
else:
|
||||
# Make a Note/Question/... looks like a Create
|
||||
dat = {
|
||||
|
@ -958,7 +961,7 @@ def _build_thread(data, include_children=True): # noqa: C901
|
|||
rep_id = rep["activity"]["object"]["id"]
|
||||
if rep_id == root_id:
|
||||
continue
|
||||
reply_of = ap._get_id(rep["activity"]["object"]["inReplyTo"])
|
||||
reply_of = ap._get_id(rep["activity"]["object"].get("inReplyTo"))
|
||||
try:
|
||||
idx[reply_of]["_nodes"].append(rep)
|
||||
except KeyError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue