* flag notifications will go to the flag details page instead of the post or user that was flag
* if you assign a flag to yourself you won't get a notification about it
@benlubar
-moved user.blocks.filter from unread controller to getUnreadTopics so
topics are filtered at other places this function is called
- when a new post is made do not send it to uids that have blocked the
poster
- update getUnreadTids so it does not return topics that have new posts
from blocked users
- update hasReadTopics so it does not return false data if topic has new
posts from blocked users
* DRY req props that depend on auth (fix#6727)
authentication leads to req.loggedIn and req.uid being set. However, a
later authentication event might outdate them. Here, I create one
function for setting those properties, and make sure it also is called
on the `action:middleware.authenticate` hook, which would be such an
authentication event. If there are other places, those should be added
as well.
* fix lint errors
* fix lint error
* change exports
- Sets session ID to be a constant-sized character field inline in the
table instead of a variable-length character field compressed outside
of the row.
- Changes the session data from "json" to "jsonb" which is faster and
smaller on disk with the drawback of not maintaining key order and
whitespace (which we don't care about at all)
- Adds a clustered index on the session expiration timestamp, which will
make periodic session purging much faster.
(For an example, WTDWTF currently has 482355 sessions in the table, and
because there is no index on the expiration timestamp, PostgreSQL must
check all the rows in the table every time.)
This upgrade script can run concurrently with a live NodeBB instance,
but any action that touches sessions will wait until the upgrade script
is done.
Does not touch the database if the database driver is not set to
PostgreSQL or if there is a Redis database configured.
* WIP promisify
* promisify psql
* ability to skip some keys
* dont promisify client object
* remove async
* clone entire module so it has all properties
* add shim for node 6
* ignore sessionStore as well
* ignore pool on psql