mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
lint compliance
This commit is contained in:
parent
6a050ad736
commit
25098e20de
@ -103,7 +103,7 @@ module.exports.create = function (Env, cb) {
|
||||
cb("ERESTRICTED", allowed);
|
||||
});
|
||||
},
|
||||
sessionClose: function (userId, reason, ip) {
|
||||
sessionClose: function (userId, reason) {
|
||||
HK.closeNetfluxSession(Env, userId);
|
||||
if (Env.logIP && !['SOCKET_CLOSED', 'INACTIVITY'].includes(reason)) {
|
||||
return void Log.info('USER_DISCONNECTED_ERROR', {
|
||||
@ -125,7 +125,7 @@ module.exports.create = function (Env, cb) {
|
||||
reason: reason,
|
||||
});
|
||||
},
|
||||
sessionOpen: function (userId, ip, oo) {
|
||||
sessionOpen: function (userId, ip) {
|
||||
if (!Env.logIP) { return; }
|
||||
Log.info('USER_CONNECTION', {
|
||||
userId: userId,
|
||||
|
||||
@ -198,7 +198,7 @@ const wsProxy = createProxyMiddleware({
|
||||
target: proxyTarget.href,
|
||||
ws: true,
|
||||
logLevel: 'error',
|
||||
onProxyReqWs: function (proxyReq, req, socket, options, head) {
|
||||
onProxyReqWs: function (proxyReq, req) {
|
||||
proxyReq.setHeader('X-Real-Ip', req.socket.remoteAddress);
|
||||
},
|
||||
logProvider: (p) => {
|
||||
|
||||
@ -127,7 +127,7 @@ define([
|
||||
var channel = data.channel;
|
||||
var title = data.title;
|
||||
var ticket = data.ticket;
|
||||
var supportKey, theirPublic, myCurve, notifKey;
|
||||
var supportKey, theirPublic, myCurve;
|
||||
var time = +new Date();
|
||||
nThen((waitFor) => {
|
||||
// Send ticket to the admins and call back
|
||||
@ -139,7 +139,8 @@ define([
|
||||
supportKey = obj.supportKey;
|
||||
theirPublic = obj.theirPublic;
|
||||
myCurve = obj.myCurve;
|
||||
notifKey = obj.notifKey;
|
||||
// No need for notifKey here: users can only create tickets for the
|
||||
// currently used key
|
||||
}));
|
||||
}).nThen((waitFor) => {
|
||||
// Create ticket mailbox
|
||||
@ -1118,16 +1119,15 @@ define([
|
||||
let proxy = ctx.store.proxy;
|
||||
let edPublic = proxy.edPublic;
|
||||
|
||||
let supportKey;
|
||||
let moderators;
|
||||
nThen((waitFor) => {
|
||||
// Check if support is enabled
|
||||
getKeys(ctx, false, {}, waitFor((err, obj) => {
|
||||
// and update ctx.adminKeys
|
||||
getKeys(ctx, false, {}, waitFor((err) => {
|
||||
if (err) {
|
||||
cb({error: err});
|
||||
return void waitFor.abort();
|
||||
}
|
||||
supportKey = obj.theirPublic;
|
||||
}));
|
||||
}).nThen((waitFor) => {
|
||||
// Only admins can disable support
|
||||
|
||||
Loading…
Reference in New Issue
Block a user