Browse Source

fixer

dependabot/npm_and_yarn/ini-1.3.7
Evan Feenstra 4 years ago
parent
commit
3a8d8c00c2
  1. 4
      dist/src/controllers/messages.js
  2. 2
      dist/src/controllers/messages.js.map
  3. 4
      src/controllers/messages.ts

4
dist/src/controllers/messages.js

@ -154,7 +154,7 @@ exports.sendMessage = (req, res) => __awaiter(void 0, void 0, void 0, function*
let realSatsContactId;
// IF BOOST NEED TO SEND ACTUAL SATS TO OG POSTER
const isTribe = chat.type === constants_1.default.chat_types.tribe;
const isTribeOwner = owner.publicKey === chat.owner_pubkey;
const isTribeOwner = isTribe && owner.publicKey === chat.ownerPubkey;
if (reply_uuid && boost && amount) {
const ogMsg = yield models_1.models.Message.findOne({ where: {
uuid: reply_uuid,
@ -208,9 +208,11 @@ exports.sendMessage = (req, res) => __awaiter(void 0, void 0, void 0, function*
};
if (realSatsContactId)
sendMessageParams.realSatsContactId = realSatsContactId;
console.log(realSatsContactId, isTribeOwner, amtToStore);
if (realSatsContactId && isTribeOwner && amtToStore) {
sendMessageParams.amount = amtToStore;
}
console.log("=> sendMsgParams", sendMessageParams);
// final send
network.sendMessage(sendMessageParams);
});

2
dist/src/controllers/messages.js.map

File diff suppressed because one or more lines are too long

4
src/controllers/messages.ts

@ -177,7 +177,7 @@ export const sendMessage = async (req, res) => {
let realSatsContactId
// IF BOOST NEED TO SEND ACTUAL SATS TO OG POSTER
const isTribe = chat.type===constants.chat_types.tribe
const isTribeOwner = owner.publicKey===chat.owner_pubkey
const isTribeOwner = isTribe && owner.publicKey===chat.ownerPubkey
if(reply_uuid && boost && amount) {
const ogMsg = await models.Message.findOne({where:{
uuid: reply_uuid,
@ -233,9 +233,11 @@ export const sendMessage = async (req, res) => {
message: msgToSend,
}
if(realSatsContactId) sendMessageParams.realSatsContactId = realSatsContactId
console.log(realSatsContactId, isTribeOwner, amtToStore)
if(realSatsContactId && isTribeOwner && amtToStore) {
sendMessageParams.amount = amtToStore
}
console.log("=> sendMsgParams",sendMessageParams)
// final send
network.sendMessage(sendMessageParams)
}

Loading…
Cancel
Save