Browse Source

pause

push-params
Evan Feenstra 4 years ago
parent
commit
57b2a4a71f
  1. 12
      api/network/send.ts
  2. 12
      dist/api/network/send.js
  3. 2
      dist/api/network/send.js.map

12
api/network/send.ts

@ -6,7 +6,7 @@ import * as path from 'path'
import * as tribes from '../utils/tribes'
import {tribeOwnerAutoConfirmation} from '../controllers/confirmations'
import {typesToForward} from './receive'
import * as intercept from './intercept'
// import * as intercept from './intercept'
const constants = require(path.join(__dirname,'../../config/constants.json'))
@ -49,11 +49,11 @@ export async function sendMessage(params) {
networkType = 'mqtt' // broadcast to all
// decrypt message.content and message.mediaKey w groupKey
msg = await decryptMessage(msg, chat)
console.log("SEND.TS isBotMsg")
const isBotMsg = await intercept.isBotMsg(msg, true)
if(isBotMsg===true) {
// return // DO NOT FORWARD TO TRIBE, forwarded to bot instead
}
// console.log("SEND.TS isBotMsg")
// const isBotMsg = await intercept.isBotMsg(msg, true)
// if(isBotMsg===true) {
// // return // DO NOT FORWARD TO TRIBE, forwarded to bot instead
// }
// post last_active to tribes server
tribes.putActivity(chat.uuid, chat.host)
} else {

12
dist/api/network/send.js

@ -17,7 +17,7 @@ const path = require("path");
const tribes = require("../utils/tribes");
const confirmations_1 = require("../controllers/confirmations");
const receive_1 = require("./receive");
const intercept = require("./intercept");
// import * as intercept from './intercept'
const constants = require(path.join(__dirname, '../../config/constants.json'));
const MIN_SATS = 3;
function sendMessage(params) {
@ -54,11 +54,11 @@ function sendMessage(params) {
networkType = 'mqtt'; // broadcast to all
// decrypt message.content and message.mediaKey w groupKey
msg = yield msg_1.decryptMessage(msg, chat);
console.log("SEND.TS isBotMsg");
const isBotMsg = yield intercept.isBotMsg(msg, true);
if (isBotMsg === true) {
// return // DO NOT FORWARD TO TRIBE, forwarded to bot instead
}
// console.log("SEND.TS isBotMsg")
// const isBotMsg = await intercept.isBotMsg(msg, true)
// if(isBotMsg===true) {
// // return // DO NOT FORWARD TO TRIBE, forwarded to bot instead
// }
// post last_active to tribes server
tribes.putActivity(chat.uuid, chat.host);
}

2
dist/api/network/send.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save