lterCommentsDB :: [CommentId] -> ExprCommentCond -> DB [CommentId]
filterCommentsDB comment_ids has_permission = fmap (map unValue) $
    select $
    from $ \c -> do
    where_ $
        c ^. CommentId `in_` valList comment_ids &&.
        has_permission c
    return (c ^. CommentId)

-- | Get all ancestors that have been closed/retracted.
f
filterCommentsDB :: [CommentId] -> ExprCommentCond -> DB [CommentId]
filterCommentsDB comment_ids has_permission = fmap (map unValue) $
    select $
    from $ \c -> do
    where_ $
        c ^. CommentId `in_` valList comment_ids &&.
        has_permission c
    return (c ^. CommentId)

-- | Get all ancestors that have been closed/retracted.
filterCommentsDB comment_ids has_permission = fmap (map unValue) $
    select $
    from $ \c -> do
    where_ $
        c ^. CommentId `in_` valList comment_ids &&.
        has_permission c
    return (c ^. CommentId)

-- | Get all ancestors that have been closed/retracted.