From 6b3eb0144e1828f49380afaf120eee4ec3db4c4c Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Wed, 9 Oct 2019 13:30:59 -0400 Subject: [PATCH] refactor: use arrow function --- src/messaging/notifications.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/messaging/notifications.js b/src/messaging/notifications.js index 0d88e3f889..91ad877123 100644 --- a/src/messaging/notifications.js +++ b/src/messaging/notifications.js @@ -53,9 +53,7 @@ module.exports = function (Messaging) { async function sendNotifications(fromuid, uids, roomId, messageObj) { const isOnline = await user.isOnline(uids); - uids = uids.filter(function (uid, index) { - return !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10); - }); + uids = uids.filter((uid, index) => !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10)); if (!uids.length) { return; }