diff --git a/src/utils/notify.js b/src/utils/notify.js index 665492c..fc14b1d 100644 --- a/src/utils/notify.js +++ b/src/utils/notify.js @@ -2,6 +2,7 @@ import clients from '../index.js'; import jwt from 'jsonwebtoken'; import config from '../../config.json' with {type: "json"}; +import log from './log.js'; const notify = (token, groupId, action, item, data) => { let login = jwt.decode(token, config.secret).login @@ -18,6 +19,7 @@ const notify = (token, groupId, action, item, data) => { if (client.currentGroup == groupId) { let userIdFromToken = jwt.decode(client.token, config.secret).login.id if (userIdCurrent == userIdFromToken) return; + log.debug(`Sending user with ID ${userIdCurrent} packet "${JSON.stringify(payload)}"`) client.socket.send(JSON.stringify(payload)) } });