[Server] Some performance improvements

This commit is contained in:
syuilo 2017-02-22 13:08:33 +09:00
parent e52965a923
commit 1f88c4d40c
14 changed files with 74 additions and 8 deletions

View file

@ -25,6 +25,10 @@ module.exports = (params, user) =>
if (recipient !== undefined && recipient !== null) {
recipient = await User.findOne({
_id: new mongo.ObjectID(recipient)
}, {
fields: {
_id: true
}
});
if (recipient === null) {