From a29a59c8998334d5fbf0d39db91c27f700f61f41 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Thu, 24 Sep 2020 11:39:23 -0700 Subject: [PATCH] latest_message, cleanup auth module --- app.ts | 4 ++-- dist/app.js | 4 ++-- dist/app.js.map | 2 +- dist/src/controllers/bots.js | 2 +- dist/src/controllers/bots.js.map | 2 +- dist/src/utils/nodeinfo.js | 16 ++++++++++++++++ dist/src/utils/nodeinfo.js.map | 2 +- src/controllers/bots.ts | 2 +- src/utils/nodeinfo.ts | 15 +++++++++++++++ 9 files changed, 40 insertions(+), 9 deletions(-) diff --git a/app.ts b/app.ts index 4097264..708641a 100644 --- a/app.ts +++ b/app.ts @@ -47,7 +47,7 @@ async function connectToLND(){ async function mainSetup(){ await setupDatabase(); if (config.hub_api_url) { - pingHubInterval(5000) + pingHubInterval(15000) checkInvitesHubInterval(5000) } await setupApp() @@ -90,7 +90,7 @@ async function authModule(req, res, next) { req.path == '/info' || req.path == '/action' || req.path == '/contacts/tokens' || - req.path == '/login' || + req.path == '/latest' || req.path.startsWith('/static') || req.path == '/contacts/set_dev' ) { diff --git a/dist/app.js b/dist/app.js index b1d3485..562c7cc 100644 --- a/dist/app.js +++ b/dist/app.js @@ -57,7 +57,7 @@ function mainSetup() { return __awaiter(this, void 0, void 0, function* () { yield setup_1.setupDatabase(); if (config.hub_api_url) { - hub_1.pingHubInterval(5000); + hub_1.pingHubInterval(15000); hub_1.checkInvitesHubInterval(5000); } yield setupApp(); @@ -98,7 +98,7 @@ function authModule(req, res, next) { req.path == '/info' || req.path == '/action' || req.path == '/contacts/tokens' || - req.path == '/login' || + req.path == '/latest' || req.path.startsWith('/static') || req.path == '/contacts/set_dev') { next(); diff --git a/dist/app.js.map b/dist/app.js.map index afc45d0..4990906 100644 --- a/dist/app.js.map +++ b/dist/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAkC;AA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C,CAAA;YACtE,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC/E,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,WAAW,EAAE;gBAC5D,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,yBAAyB,EAAE,EAAC,cAAc,EAAG,YAAY,EAAC,CAAC,CAAC;gBAC/E,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;aAC/B;iBAAM;gBACN,IAAI,EAAE,CAAC;aACP;SACD;IACF,CAAC;CAAA;AAED,kBAAe,MAAM,CAAA"} \ No newline at end of file diff --git a/dist/src/controllers/bots.js b/dist/src/controllers/bots.js index 9093cb3..b9a5c70 100644 --- a/dist/src/controllers/bots.js +++ b/dist/src/controllers/bots.js @@ -296,7 +296,7 @@ function buildBotPayload(msg) { exports.buildBotPayload = buildBotPayload; function receiveBotRes(payload) { return __awaiter(this, void 0, void 0, function* () { - console.log("=> receiveBotRes", payload); + console.log("=> receiveBotRes"); //, payload) const dat = payload.content || payload; if (!dat.chat || !dat.message || !dat.sender) { return console.log('=> receiveBotRes error, no chat||msg||sender'); diff --git a/dist/src/controllers/bots.js.map b/dist/src/controllers/bots.js.map index c0a25cc..fcd2065 100644 --- a/dist/src/controllers/bots.js.map +++ b/dist/src/controllers/bots.js.map @@ -1 +1 @@ -{"version":3,"file":"bots.js","sourceRoot":"","sources":["../../../src/controllers/bots.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,0CAAyC;AACzC,iCAAgC;AAChC,sCAAkC;AAClC,2CAA0C;AAC1C,sCAA+C;AAC/C,sCAAqC;AACrC,+BAAwC;AACxC,0CAAyC;AACzC,2CAA8B;AAC9B,wCAAuC;AAGvC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAA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yB;gBAChC,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO;gBACrC,MAAM,EAAE,CAAC,MAAM,IAAE,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;gBAChC,MAAM,EAAE,MAAM,IAAI,CAAC;gBACnB,IAAI,EAAE,IAAI;gBACV,cAAc,EAAE,OAAO;gBACvB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS;gBACpC,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,YAAY,IAAI,KAAK;aACnC,CAAA;YACD,MAAM,OAAO,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAChD,MAAM,CAAC,QAAQ,CAAC;gBACd,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC;aAC3D,CAAC,CAAA;SACH;IACH,CAAC;CAAA;AA5DD,sCA4DC"} \ No newline at end of file +{"version":3,"file":"bots.js","sourceRoot":"","sources":["../../../src/controllers/bots.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,0CAAyC;AACzC,iCAAgC;AAChC,sCAAkC;AAClC,2CAA0C;AAC1C,sCAA+C;AAC/C,sCAAqC;AACrC,+BAAwC;AACxC,0CAAyC;AACzC,2CAA8B;AAC9B,wCAAuC;AAGvC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAEjE,QAAA,OAAO,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACxC,IAAI;QACF,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;QACvC,aAAO,CAAC,GAAG,EAAE;YACX,I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AAC;gBACnB,IAAI,EAAE,IAAI;gBACV,cAAc,EAAE,OAAO;gBACvB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS;gBACpC,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,YAAY,IAAI,KAAK;aACnC,CAAA;YACD,MAAM,OAAO,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAChD,MAAM,CAAC,QAAQ,CAAC;gBACd,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC;aAC3D,CAAC,CAAA;SACH;IACH,CAAC;CAAA;AA5DD,sCA4DC"} \ No newline at end of file diff --git a/dist/src/utils/nodeinfo.js b/dist/src/utils/nodeinfo.js index 01a04fd..f245768 100644 --- a/dist/src/utils/nodeinfo.js +++ b/dist/src/utils/nodeinfo.js @@ -25,6 +25,7 @@ function nodeinfo() { const lightning = lightning_1.loadLightning(); const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); const clean = yield isClean(); + const latest_message = yield latestMessage(); try { lightning.channelBalance({}, (err, channelBalance) => { if (err) @@ -73,6 +74,7 @@ function nodeinfo() { best_header_timestamp: info.best_header_timestamp, testnet: info.testnet, clean, + latest_message, }; resolve(node); } @@ -100,4 +102,18 @@ function isClean() { return false; }); } +function latestMessage() { + return __awaiter(this, void 0, void 0, function* () { + const last = yield models_1.models.Message.findAll({ + limit: 1, + order: [['createdAt', 'DESC']] + }); + if (last) { + return last.createdAt; + } + else { + return ''; + } + }); +} //# sourceMappingURL=nodeinfo.js.map \ No newline at end of file diff --git a/dist/src/utils/nodeinfo.js.map b/dist/src/utils/nodeinfo.js.map index d972c27..8d93fc0 100644 --- a/dist/src/utils/nodeinfo.js.map +++ b/dist/src/utils/nodeinfo.js.map @@ -1 +1 @@ -{"version":3,"file":"nodeinfo.js","sourceRoot":"","sources":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AA;IACd,CAAC;CAAA;AAED,SAAe,aAAa;;QAC1B,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC,CAAE,WAAW,EAAE,MAAM,CAAE,CAAC;SACjC,CAAC,CAAA;QACF,IAAG,IAAI,EAAE;YACP,OAAO,IAAI,CAAC,SAAS,CAAA;SACtB;aAAM;YACL,OAAO,EAAE,CAAA;SACV;IACH,CAAC;CAAA"} \ No newline at end of file diff --git a/src/controllers/bots.ts b/src/controllers/bots.ts index 0bcb93a..3aabd4c 100644 --- a/src/controllers/bots.ts +++ b/src/controllers/bots.ts @@ -285,7 +285,7 @@ export function buildBotPayload(msg:Msg): SphinxBot.Message { } export async function receiveBotRes(payload) { - console.log("=> receiveBotRes", payload) + console.log("=> receiveBotRes")//, payload) const dat = payload.content || payload if(!dat.chat || !dat.message || !dat.sender) { diff --git a/src/utils/nodeinfo.ts b/src/utils/nodeinfo.ts index edda975..d71a091 100644 --- a/src/utils/nodeinfo.ts +++ b/src/utils/nodeinfo.ts @@ -20,6 +20,8 @@ function nodeinfo(){ const clean = await isClean() + const latest_message = await latestMessage() + try { lightning.channelBalance({}, (err, channelBalance) => { if(err) console.log(err) @@ -65,6 +67,7 @@ function nodeinfo(){ best_header_timestamp: info.best_header_timestamp, testnet: info.testnet, clean, + latest_message, } resolve(node) } @@ -89,4 +92,16 @@ async function isClean(){ const onlyOneContact = allContacts===1 if(cleanOwner && noMsgs && onlyOneContact) return true return false +} + +async function latestMessage(): Promise { + const last = await models.Message.findAll({ + limit: 1, + order: [[ 'createdAt', 'DESC' ]] + }) + if(last) { + return last.createdAt + } else { + return '' + } } \ No newline at end of file