Improve performance

This commit is contained in:
syuilo 2018-10-29 21:35:46 +09:00
parent fa17623fa8
commit 13acf570e7
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -269,7 +269,7 @@ export const pack = (
delete _user.hasUnreadNotification; delete _user.hasUnreadNotification;
} }
if (meId && !meId.equals(_user.id)) { if (meId && !meId.equals(_user.id) && opts.detail) {
const [following1, following2, followReq1, followReq2, toBlocking, fromBlocked, mute] = await Promise.all([ const [following1, following2, followReq1, followReq2, toBlocking, fromBlocked, mute] = await Promise.all([
Following.findOne({ Following.findOne({
followerId: meId, followerId: meId,