From 43b7cd9776d0b134aeebfbe7b814d632aee562fb Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Tue, 24 Nov 2020 11:35:59 -0800 Subject: [PATCH] fix boost for tribe sub --- app.ts | 1 + dist/app.js | 1 + dist/app.js.map | 2 +- dist/src/auth.js | 4 ++++ dist/src/auth.js.map | 2 +- dist/src/controllers/messages.js | 8 +++----- dist/src/controllers/messages.js.map | 2 +- src/auth.ts | 5 +++++ src/controllers/messages.ts | 8 +++----- 9 files changed, 20 insertions(+), 13 deletions(-) diff --git a/app.ts b/app.ts index 5013999..a724c2a 100644 --- a/app.ts +++ b/app.ts @@ -80,6 +80,7 @@ async function setupApp(){ app.post('/unlock', async function(req,res){ const ok = await unlocker(req,res) if(ok) { + console.log('=> relay unlocked!') controllers.set(app); socket.connect(server) } diff --git a/dist/app.js b/dist/app.js index 305f785..2e68cc1 100644 --- a/dist/app.js +++ b/dist/app.js @@ -93,6 +93,7 @@ function setupApp() { return __awaiter(this, void 0, void 0, function* () { const ok = yield auth_1.unlocker(req, res); if (ok) { + console.log('=> relay unlocked!'); controllers.set(app); socket.connect(server); } diff --git a/dist/app.js.map b/dist/app.js.map index 0f4a1a3..2b5bcc5 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;AAClC,0CAAyC;AACzC,iCAAgC;AAChC,8CAA6C;AAC7C,6BAA4B;AAC5B,6BAA4B;AAC5B,+CAAuC;AACvC,mCAAkE;AAClE,6CAA0D;AAC1D,iDAAgD;AAChD,6CAA4C;AAC5C,yCAAwC;AACxC,qCAA+C;AAC/C,mCAAkC;AAElC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CA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AAC;QAC7C,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;QAEhD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;YAC3B,IAAI,GAAG;gBAAE,MAAM,GAAG,CAAC;YACnB,+BAA+B;YAC/B,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,GAAG,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QAEH,oBAAoB;QACpB,IAAG,CAAC,MAAM,CAAC,MAAM,EAAE;YAClB,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;SACtB;aAAM;YACN,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,UAAe,GAAG,EAAC,GAAG;;oBACzC,MAAM,EAAE,GAAG,MAAM,eAAQ,CAAC,GAAG,EAAC,GAAG,CAAC,CAAA;oBAClC,IAAG,EAAE,EAAE;wBACN,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;wBACjC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;wBACrB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;qBACtB;gBACF,CAAC;aAAA,CAAC,CAAA;SACF;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/src/auth.js b/dist/src/auth.js index 7df83e9..2c9be40 100644 --- a/dist/src/auth.js +++ b/dist/src/auth.js @@ -18,6 +18,10 @@ const macaroon_1 = require("./utils/macaroon"); const fs = require('fs'); const env = process.env.NODE_ENV || 'development'; const config = require(path.join(__dirname, '../config/app.json'))[env]; +/* +"unlock": true, +"encrypted_macaroon_path": "/relay/.lnd/admin.macaroon.enc" +*/ function unlocker(req, res) { return __awaiter(this, void 0, void 0, function* () { const { password } = req.body; diff --git a/dist/src/auth.js.map b/dist/src/auth.js.map index ed5dfe9..2110267 100644 --- a/dist/src/auth.js.map +++ b/dist/src/auth.js.map @@ -1 +1 @@ -{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAAgC;AAChC,qCAAiC;AACjC,yCAAgC;AAChC,6BAA4B;AAC5B,qCAA8C;AAC9C,+CAAoD;AACpD,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAExB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAExE,SAAsB,QAAQ,CAAC,GAAG,EAAE,GAAG;;QACrC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,IAAI,CAAA;QAC7B,IAAG,CAAC,QAAQ,EAAE;YACZ,aAAO,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;YAC3B,OAAO,KAAK,CAAA;SACb;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,uBAAuB,CAAA;QACjD,IAAG,CAAC,UAAU,EAAE;YACd,aAAO,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAA;YAChC,OAAO,KAAK,CAAA;SACb;QAED,IAAI,MAAa,CAAA;QAEjB,IAAI;YAEF,IAAI,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;YAC7D,IAAG,CAAC,MAAM,EAAE;gBACV,aAAO,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;gBAC3B,OAAO,KAAK,CAAA;aACb;YAED,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;YAChD,IAAG,CAAC,MAAM,EAAE;gBACV,aAAO,CAAC,GAAG,EAAE,4BAA4B,C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EAAE,CAAC,CAAA;QAC1C,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAA;KAC/C;IACD,OAAO,MAAM,CAAC,WAAW,EAAE,CAAA;AAC7B,CAAC;AARD,kCAQC;AAED,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/src/controllers/messages.js b/dist/src/controllers/messages.js index 6fc2ca4..11e494f 100644 --- a/dist/src/controllers/messages.js +++ b/dist/src/controllers/messages.js @@ -152,10 +152,8 @@ exports.sendMessage = (req, res) => __awaiter(void 0, void 0, void 0, function* recipient_id: contact_id, }); let realSatsContactId; - // IF BOOST AND TRIBE OWNER NEED TO SEND ACTUAL SATS TO OG POSTER - const isTribe = chat.type === constants_1.default.chat_types.tribe; - const isTribeOwner = isTribe && owner.publicKey === chat.ownerPubkey; - if (isTribeOwner && reply_uuid && boost && amount) { + // IF BOOST NEED TO SEND ACTUAL SATS TO OG POSTER + if (reply_uuid && boost && amount) { const ogMsg = yield models_1.models.Message.findOne({ where: { uuid: reply_uuid, } }); @@ -177,7 +175,7 @@ exports.sendMessage = (req, res) => __awaiter(void 0, void 0, void 0, function* status: constants_1.default.statuses.pending, createdAt: date, updatedAt: date, - network_type: (!isTribe || realSatsContactId) ? + network_type: realSatsContactId ? constants_1.default.network_types.lightning : constants_1.default.network_types.mqtt }; diff --git a/dist/src/controllers/messages.js.map b/dist/src/controllers/messages.js.map index 391e1d5..3623c23 100644 --- a/dist/src/controllers/messages.js.map +++ b/dist/src/controllers/messages.js.map @@ -1 +1 @@ -{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,y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EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAA+C;AAC/C,0CAAyC;AACzC,mDAAgD;AAChD,sCAAqC;AACrC,oCAAmC;AACnC,4CAAoC;AAEvB,QAAA,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,sBAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IACxE,mCAAmC;IAEnC,IAAI,gBAAgB,GAAG;QACtB,IAAI,EAAE,EAAE,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE;QAChC,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE;YACR,EAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAC;YACpB,EAAC,QAAQ,EAAE,IAAI,EAAC;SAChB;KACD,CAAA;IAED,IAAI,sBAAsB,GAAG;QAC5B,UAAU,EAAE,EAAE,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE;QACtC,MAAM,EAAE,EAAC,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE;gB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AM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file diff --git a/src/auth.ts b/src/auth.ts index baa43b1..557b659 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -9,6 +9,11 @@ const fs = require('fs') const env = process.env.NODE_ENV || 'development'; const config = require(path.join(__dirname, '../config/app.json'))[env]; +/* +"unlock": true, +"encrypted_macaroon_path": "/relay/.lnd/admin.macaroon.enc" +*/ + export async function unlocker(req, res): Promise { const { password } = req.body if(!password) { diff --git a/src/controllers/messages.ts b/src/controllers/messages.ts index 572fca4..dc5e6d3 100644 --- a/src/controllers/messages.ts +++ b/src/controllers/messages.ts @@ -174,10 +174,8 @@ export const sendMessage = async (req, res) => { }) let realSatsContactId - // IF BOOST AND TRIBE OWNER NEED TO SEND ACTUAL SATS TO OG POSTER - const isTribe = chat.type===constants.chat_types.tribe - const isTribeOwner = isTribe && owner.publicKey===chat.ownerPubkey - if(isTribeOwner && reply_uuid && boost && amount) { + // IF BOOST NEED TO SEND ACTUAL SATS TO OG POSTER + if(reply_uuid && boost && amount) { const ogMsg = await models.Message.findOne({where:{ uuid: reply_uuid, }}) @@ -200,7 +198,7 @@ export const sendMessage = async (req, res) => { status: constants.statuses.pending, createdAt: date, updatedAt: date, - network_type: (!isTribe || realSatsContactId) ? + network_type: realSatsContactId ? constants.network_types.lightning : constants.network_types.mqtt }