Desired behavior for new posts when FilterNewPosts setting is enabled
is that people with admin_level >= 2 and post authors should see their
post on the frontpage, while all other unprivileged users shouldn't.
The logic for this is already in `files.helpers.listing` but it was
overridden by a second filter condition which required `state_mod =
VISIBLE`.
`(state_mod = VISIBLE | author_id = v.id) & (state_mod = VISIBLE)`
simplifies in an unfortunate way. The latter condition was also not
conditional on admin_level. Simply removing it fixes the listing
for both post authors and privileged users.
it's kinda hard to give a good description but this fixes a bug where
the raw HTML of a post's content (not mediated by `realbody`) is being
sent to the `submission_banned.html` template. it also fixes the
formatting.
Handle a couple places with `t3_` that persisted from code movement.
on master after time of branch.
Then, fix commenting, which used inaccurate fullname parsing logic.
because of #606, we now have a relatively decent way of representing
how post/comment state is in the database. we'll use this in our code
which is used to determine what is shown in the UI
The notifications schema is already set up for reddit-style
chronological notifications. We simply have to remove the logic that
builds the context and patch up a few places in the frontend that
were expecting full reply trees.
`Comment.header_msg` previously expected the user's own comment to
be top-level in comment replies. Logic is revised to expect the actual
reply.
`files.routes.front.notifications_main` now has reduced query volume
because we aren't expiring the session when marking notifications read.
This also allows us to remove the unused `comms` variable, which is a
makeshift "pattern" of storing duplicate database replies across a
commit so the templates don't requery (thus losing data attached to
the runtime object, like `c.unread` / `c.notif_utc`).
We move the `is_notification_page` flag to the route callers rather
than templates checking `request.path`.
Minor UI style: "Clear all notifications" -> "Mark All Read", since
this was a persistent point of user confusion upstream, with people
expecting their inbox to empty out. Also less margin between notifs
to be consistent with tighter comment display elsewhere and removed
need to separate groups of comments vs single comments.