Resolve conflicts
This commit is contained in:
parent
281b388e39
commit
bfc193d8cd
308 changed files with 3045 additions and 3200 deletions
|
|
@ -13,18 +13,18 @@ import Mute from '../../models/mute';
|
|||
*/
|
||||
module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
const mute = await Mute.find({
|
||||
muter_id: user._id,
|
||||
deleted_at: { $exists: false }
|
||||
muterId: user._id,
|
||||
deletedAt: { $exists: false }
|
||||
});
|
||||
const mutedUserIds = mute.map(m => m.mutee_id);
|
||||
const mutedUserIds = mute.map(m => m.muteeId);
|
||||
|
||||
const count = await Message
|
||||
.count({
|
||||
user_id: {
|
||||
userId: {
|
||||
$nin: mutedUserIds
|
||||
},
|
||||
recipient_id: user._id,
|
||||
is_read: false
|
||||
recipientId: user._id,
|
||||
isRead: false
|
||||
});
|
||||
|
||||
res({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue