How to make the queued posts visible to their authors?

I just took a quick look at this PR and have a few concerns. It’s possible I’ve misunderstood how the code works so I’d appreciate any corrections :slight_smile:

  • It seems like when this feature is enabled, the post is inserted into the topic right away as opposed to the queuing table. A separate table queued_preview_post_maps is used to keep track of posts that are currently queued in this way.

I can think of a couple major downsides to this:

  • This means the hide_queued_preview scope has to be added in every place a user might be able to see another user’s post. This kind of thing is quite easy to forget when someone adds any new code that fetches posts.

  • There are serious performance considerations. We have to join an extra table for every query for a post wouldn’t we? This seems to be true even if the feature is disabled? Additionally the new table doesn’t have any indexes right now which is a performance time bomb.

  • If a user makes a post mid topic, say post 50, then 20 other people make posts and many readers follow along, what happens when the post is approved? Won’t all the readers who read past it have missed the post? It seems to me it would leave a gap in their topic.

I don’t think we could accept it without work to address these issues.