diff --git a/brutaldon/threadtree.py b/brutaldon/threadtree.py index c2eedf7..bedc94b 100644 --- a/brutaldon/threadtree.py +++ b/brutaldon/threadtree.py @@ -7,14 +7,18 @@ def maketree(descendants): for descendant in descendants: if not descendant.in_reply_to_id: roots.add(descendant.id) - print("ROOT", descendant.id, descendant.account.acct) + print("ROOT", descendant.id, descendant.account.id, descendant.account.acct) elif descendant.in_reply_to_id in replies: reps = replies[descendant.in_reply_to_id] reps.add(descendant.id) - print("REPLY", descendant.id, descendant.in_reply_to_id) + print("REPLY", descendant.id, + descendant.in_reply_to_id, + descendant.in_reply_to_id in lookup) else: reps = set() - print("NEWREPLY", descendant.id, descendant.in_reply_to_id) + print("NEWREPLY", descendant.id, + descendant.in_reply_to_id, + descendant.in_reply_to_id in lookup) replies[descendant.in_reply_to_id] = set([descendant.id]) seen = set() def onelevel(reps): diff --git a/brutaldon/views.py b/brutaldon/views.py index 49a8b55..056807b 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -688,10 +688,10 @@ def thread(request, id): notifications = _notes_count(account, mastodon) filters = get_filters(mastodon, context="thread") - # Apply filters - descendants = [ - x for x in context.descendants if not toot_matches_filters(x, filters) - ] + # # Apply filters + # descendants = [ + # x for x in context.descendants if not toot_matches_filters(x, filters) + # ] posts = tuple(threadtree.build(descendants)) from pprint import pprint pprint(posts)