refactor: remove some outdated todos and legacy fallbacks

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2024-01-04 12:55:47 +01:00
parent f7585cfc75
commit 428537df1f
7 changed files with 9 additions and 26 deletions

View File

@@ -77,7 +77,7 @@ defmodule Mobilizon.Discussions do
|> join(:left, [c], r in Comment, on: r.origin_comment_id == c.id)
|> where([c, _], is_nil(c.in_reply_to_comment_id))
|> where([c], c.visibility in ^@public_visibility)
# TODO: This was added because we don't want to count deleted comments in total_replies.
# This was added because we don't want to count deleted comments in total_replies.
# However, it also excludes all top-level comments with deleted replies from being selected
# |> where([_, r], is_nil(r.deleted_at))
|> group_by([c], c.id)