debug info
This commit is contained in:
		| @@ -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)) | ||||
|         } | ||||
|     }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user