From 3852e3900de395d704d0f816e63924c596727318 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Fri, 20 Nov 2020 15:43:52 -0800 Subject: [PATCH] amtToForward --- dist/src/network/receive.js | 13 ++++++++----- dist/src/network/receive.js.map | 2 +- dist/src/network/send.js | 5 +++++ dist/src/network/send.js.map | 2 +- src/network/receive.ts | 13 ++++++++----- src/network/send.ts | 5 +++++ 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/dist/src/network/receive.js b/dist/src/network/receive.js index 1fd85f7..dec1f2e 100644 --- a/dist/src/network/receive.js +++ b/dist/src/network/receive.js @@ -137,20 +137,22 @@ function onReceive(payload) { } // forward boost sats to recipient let realSatsContactId = null; + let amtToForward = 0; if (payload.type === msgtypes.boost && payload.message.replyUuid) { const ogMsg = yield models_1.models.Message.findOne({ where: { uuid: payload.message.replyUuid, } }); if (ogMsg && ogMsg.sender && ogMsg.sender !== 1) { - const amtToForward = payload.message.amount - (chat.pricePerMessage || 0) - (chat.escrowAmount || 0); - if (amtToForward > 0) { + const theAmtToForward = payload.message.amount - (chat.pricePerMessage || 0) - (chat.escrowAmount || 0); + if (theAmtToForward > 0) { realSatsContactId = ogMsg.sender; + amtToForward = theAmtToForward; console.log('=======> ADMIN WILL FORWARD BOOST TO', ogMsg.sender); } } } if (doAction) - forwardMessageToTribe(payload, senderContact, realSatsContactId); + forwardMessageToTribe(payload, senderContact, realSatsContactId, amtToForward); else console.log('=> insufficient payment for this action'); } @@ -205,7 +207,7 @@ function doTheAction(data) { } }); } -function forwardMessageToTribe(ogpayload, sender, realSatsContactId) { +function forwardMessageToTribe(ogpayload, sender, realSatsContactId, amtToForward) { return __awaiter(this, void 0, void 0, function* () { // console.log('forwardMessageToTribe') const chat = yield models_1.models.Chat.findOne({ where: { uuid: ogpayload.chat.uuid } }); @@ -226,9 +228,10 @@ function forwardMessageToTribe(ogpayload, sender, realSatsContactId) { send_1.sendMessage({ type, message, sender: Object.assign(Object.assign(Object.assign({}, owner.dataValues), payload.sender && payload.sender.alias && { alias: payload.sender.alias }), { role: constants_1.default.chat_roles.reader }), + amount: amtToForward || 0, chat: chat, skipPubKey: payload.sender.pub_key, - realSatsContactId: realSatsContactId, + realSatsContactId, success: () => { }, receive: () => { }, isForwarded: true, diff --git a/dist/src/network/receive.js.map b/dist/src/network/receive.js.map index 1f54e3d..e1a4fa2 100644 --- a/dist/src/network/receive.js.map +++ b/dist/src/network/receive.js.map @@ -1 +1 @@ -{"version":3,"file":"receive.js","sourceRoot":"","sources":["../../../src/network/receive.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAqC;AACrC,kDAA0C;AAC1C,gDAAsC;AACtC,0CAAyC;AACzC,kDAA2D;AAC3D,0CAAyC;AACzC,sCAAkC;AAClC,iCAAkC;AAClC,qCAA8G;AAC9G,sCAAiE;AACjE,yCAA8B;AAC9B,0CAAyC;AACzC,0CAAyC;AACzC,gCAAyC;AACzC,4CAAoC;AACpC,2CAA0C;AAE1C;;;;EAIE;AAEF,MAAM,QAAQ,GAAG,mBAAS,CAAC,aAAa,CAAA;AAE3B,QAAA,cAAc,GAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,WAAW;IAC3D,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK;CACpD,CAAA;AACD,MAAM,aAAa,GAAC;IACnB,QAAQ,CAAC,UAAU;CACnB,CAAA;AACD,MAAM,4BAA4B,GAAG;IACpC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK;CACrD,CAAA;AACY,QAAA,aAAa,GAAC;IAC1B,QAAQ,CAAC,OAAO;IAChB,QAAQ,CAAC,UAAU;IACnB,QAAQ,CAAC,WAAW;IACpB,QAAQ,CAAC,OAAO;CAChB,CAAA;AACD,MAAM,QAAQ,GAAC;IACd,mBAAS,CAAC,aAAa,CAAC,WAAW;IACn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ACtB,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,EAAE,CAAA,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAA,EAAE;YAC7C,OAAO,IAAI,GAAG,CAAC,CAAC,CAAA;QACjB,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAC,EAAE,CAAC,CAAA;QACjB,OAAO,OAAO,CAAA;KACd;AACF,CAAC"} \ No newline at end of file diff --git a/dist/src/network/send.js b/dist/src/network/send.js index d78148f..495fd09 100644 --- a/dist/src/network/send.js +++ b/dist/src/network/send.js @@ -89,6 +89,11 @@ function sendMessage(params) { let mqttTopic = networkType === 'mqtt' ? `${destkey}/${chatUUID}` : ''; // sending a payment to one subscriber, buying a pic from OG poster // or boost to og poster + if (realSatsContactId) { + console.log("REAL SATS CONTACT ID", realSatsContactId); + console.log("is tribe owenr", isTribeOwner); + console.log('amount', amount); + } if (isTribeOwner && amount && realSatsContactId === contactId) { mqttTopic = ''; // FORCE KEYSEND!!! } diff --git a/dist/src/network/send.js.map b/dist/src/network/send.js.map index bbd5590..d5b929c 100644 --- a/dist/src/network/send.js.map +++ b/dist/src/network/send.js.map @@ -1 +1 @@ -{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/network/send.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,0CAAyC;AACzC,0CAAyC;AACzC,sCAA+D;AAC/D,0CAAyC;AACzC,gEAAuE;AACvE,uCAAwC;AACxC,yCAAwC;AACxC,4CAAoC;AAIpC,SAAsB,WAAW,CAAC,MAAM;;QACvC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAA;Q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M,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YACvC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,mBAAS,CAAC,UAAU,CAAC,MAAM;SAGhD;KACD,CAAA;AACF,CAAC;AAvBD,wBAuBC;AAED,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAChD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC7C;IACF,CAAC;CAAA;AACD,SAAe,KAAK,CAAC,EAAE;;QACtB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;IACvD,CAAC;CAAA;AAED,oCAAoC;AACpC,iGAAiG;AACjG,IAAI;AACJ,oCAAoC;AACpC,yFAAyF;AACzF,IAAI"} \ No newline at end of file +{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/network/send.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,0CAAyC;AACzC,0CAAyC;AACzC,sCAA+D;AAC/D,0CAAyC;AACzC,gEAAuE;AACvE,uCAAwC;AACxC,yCAAwC;AACxC,4CAAoC;AAIpC,SAAsB,WAAW,CAAC,MAAM;;QACvC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAA;QACpH,IAAG,CAAC,IAAI,IAAI,CAAC,MAAM;YAAE,OAAM;QAE3B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,KAAG,mBAAS,CAAC,UAAU,CAAC,KAAK,CAAA;QACtD,IAAI,YAAY,GAAG,OAAO,IAAI,MAAM,C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zB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YACvC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,mBAAS,CAAC,UAAU,CAAC,MAAM;SAGhD;KACD,CAAA;AACF,CAAC;AAvBD,wBAuBC;AAED,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAChD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC7C;IACF,CAAC;CAAA;AACD,SAAe,KAAK,CAAC,EAAE;;QACtB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;IACvD,CAAC;CAAA;AAED,oCAAoC;AACpC,iGAAiG;AACjG,IAAI;AACJ,oCAAoC;AACpC,yFAAyF;AACzF,IAAI"} \ No newline at end of file diff --git a/src/network/receive.ts b/src/network/receive.ts index 387c4e3..6096116 100644 --- a/src/network/receive.ts +++ b/src/network/receive.ts @@ -123,19 +123,21 @@ async function onReceive(payload){ } // forward boost sats to recipient let realSatsContactId = null + let amtToForward = 0 if(payload.type===msgtypes.boost && payload.message.replyUuid) { const ogMsg = await models.Message.findOne({where:{ uuid: payload.message.replyUuid, }}) if(ogMsg && ogMsg.sender && ogMsg.sender!==1) { - const amtToForward = payload.message.amount - (chat.pricePerMessage||0) - (chat.escrowAmount||0) - if(amtToForward>0) { + const theAmtToForward = payload.message.amount - (chat.pricePerMessage||0) - (chat.escrowAmount||0) + if(theAmtToForward>0) { realSatsContactId = ogMsg.sender + amtToForward = theAmtToForward console.log('=======> ADMIN WILL FORWARD BOOST TO',ogMsg.sender) } } } - if(doAction) forwardMessageToTribe(payload, senderContact, realSatsContactId) + if(doAction) forwardMessageToTribe(payload, senderContact, realSatsContactId, amtToForward) else console.log('=> insufficient payment for this action') } if(isTribeOwner && payload.type===msgtypes.purchase) { @@ -185,7 +187,7 @@ async function doTheAction(data){ } } -async function forwardMessageToTribe(ogpayload, sender, realSatsContactId){ +async function forwardMessageToTribe(ogpayload, sender, realSatsContactId, amtToForward){ // console.log('forwardMessageToTribe') const chat = await models.Chat.findOne({where:{uuid:ogpayload.chat.uuid}}) @@ -210,9 +212,10 @@ async function forwardMessageToTribe(ogpayload, sender, realSatsContactId){ ...payload.sender&&payload.sender.alias && {alias:payload.sender.alias}, role: constants.chat_roles.reader, }, + amount: amtToForward||0, chat: chat, skipPubKey: payload.sender.pub_key, - realSatsContactId: realSatsContactId, + realSatsContactId, success: ()=>{}, receive: ()=>{}, isForwarded: true, diff --git a/src/network/send.ts b/src/network/send.ts index 28b7cf2..ca40efc 100644 --- a/src/network/send.ts +++ b/src/network/send.ts @@ -86,6 +86,11 @@ export async function sendMessage(params) { // sending a payment to one subscriber, buying a pic from OG poster // or boost to og poster + if(realSatsContactId) { + console.log("REAL SATS CONTACT ID",realSatsContactId) + console.log("is tribe owenr",isTribeOwner) + console.log('amount', amount) + } if(isTribeOwner && amount && realSatsContactId===contactId) { mqttTopic = '' // FORCE KEYSEND!!! }