Open AndrewMagliozzi opened 8 years ago
This is a rough one to fix on our end -- we might need a PR upstream, as it's rather thickly abstracted and thus tough to monkeypatch.
The core problem here: the view tries to show 5 latest comments; but as mongo doesn't do joins, we don't know anything about the status of the post prior to making that selection. So to hide comments for rejected/deleted posts would require one of:
commentsList
publication to select more comments than 5 (possibly all of them) and then slicing the first 5 that are not rejected (e.g. moving the limit param from mongo to frontend code). This has negative performance implications.Let me know what the level of importance for this is and I'll pick one of these. I'm leaning toward option 3 as the cleanest, and would discuss with Sacha as a change to core Telescope, but also explore doing a monkeypatch of it for our purposes in the mean time.
@yourcelf - I stumbled on this comment while searching for an existing solution to this problem. Did you ever fix this issue in your app? If so, did you go with #3 (we were thinking of doing the same)?
Hey @brockmiller it looks like this is still an outstanding issue for us. I don't think we implemented a fix yet, but #3 does seem like a good solution. You might want to search (or post an issue on) the main Telescope github repo to see if it's something they are working on as well.
This is particularly relevant for Dan's profile page, because he provides answers to every question, even those that he rejects / deletes...
https://college.admithub.com/users/danpeterson