Use latest chainpad-server and its updated events

This commit is contained in:
yflory 2024-03-07 10:58:25 +01:00
parent 1879fd2226
commit 447a7e183c
2 changed files with 9 additions and 2 deletions

View File

@ -105,8 +105,15 @@ module.exports.create = function (Env, cb) {
cb("ERESTRICTED", allowed);
});
},
sessionClose: function (userId, reason) {
sessionClose: function (userId, reason, ip) {
HK.closeNetfluxSession(Env, userId);
if (Env.logIP) {
return void Log.info('USER_DISCONNECTED', {
userId: userId,
reason: reason,
ip: ip,
});
}
if (['BAD_MESSAGE', 'SEND_MESSAGE_FAIL_2'].indexOf(reason) !== -1) {
if (reason && reason.code === 'ECONNRESET') { return; }
return void Log.error('SESSION_CLOSE_WITH_ERROR', {

View File

@ -14,7 +14,7 @@
"dependencies": {
"@mcrowe/minibloom": "^0.2.0",
"chainpad-crypto": "^0.2.5",
"chainpad-server": "^5.1.0",
"chainpad-server": "^5.2.0",
"cookie-parser": "^1.4.6",
"body-parser": "^1.20.2",
"express": "~4.18.2",