mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
refactor: use arrow function
This commit is contained in:
@@ -53,9 +53,7 @@ module.exports = function (Messaging) {
|
|||||||
|
|
||||||
async function sendNotifications(fromuid, uids, roomId, messageObj) {
|
async function sendNotifications(fromuid, uids, roomId, messageObj) {
|
||||||
const isOnline = await user.isOnline(uids);
|
const isOnline = await user.isOnline(uids);
|
||||||
uids = uids.filter(function (uid, index) {
|
uids = uids.filter((uid, index) => !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10));
|
||||||
return !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10);
|
|
||||||
});
|
|
||||||
if (!uids.length) {
|
if (!uids.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user