Browse Source

fix msg type in broadcast

push-params
Evan Feenstra 4 years ago
parent
commit
ffd4020e2a
  1. 1
      api/bots/btc.ts
  2. 2
      api/controllers/actions.ts
  3. 1
      dist/api/bots/btc.js
  4. 2
      dist/api/bots/btc.js.map
  5. 2
      dist/api/controllers/actions.js

1
api/bots/btc.ts

@ -21,7 +21,6 @@ export function init() {
client.on(msg_types.MESSAGE, async (message: Sphinx.Message) => { client.on(msg_types.MESSAGE, async (message: Sphinx.Message) => {
const arr = message.content.split(' ') const arr = message.content.split(' ')
console.log("BTC MSG ARR",arr)
if (arr.length < 2) return if (arr.length < 2) return
if (arr[0]!=='/btc') return if (arr[0]!=='/btc') return
const cmd = arr[1] const cmd = arr[1]

2
api/controllers/actions.ts

@ -120,7 +120,7 @@ export async function finalAction(a:Action){
chat: theChat, chat: theChat,
sender: { ...owner.dataValues, alias, id:botContactId }, sender: { ...owner.dataValues, alias, id:botContactId },
message: { content: textMap, id: message.id, uuid: message.uuid }, message: { content: textMap, id: message.id, uuid: message.uuid },
type: constants.message_types.message, type: constants.message_types.bot_res,
success: () => ({ success: true }), success: () => ({ success: true }),
failure: (e) => { failure: (e) => {
throw e throw e

1
dist/api/bots/btc.js

@ -27,7 +27,6 @@ function init() {
client.login('_', actions_1.finalAction); client.login('_', actions_1.finalAction);
client.on(msg_types.MESSAGE, (message) => __awaiter(this, void 0, void 0, function* () { client.on(msg_types.MESSAGE, (message) => __awaiter(this, void 0, void 0, function* () {
const arr = message.content.split(' '); const arr = message.content.split(' ');
console.log("BTC MSG ARR", arr);
if (arr.length < 2) if (arr.length < 2)
return; return;
if (arr[0] !== '/btc') if (arr[0] !== '/btc')

2
dist/api/bots/btc.js.map

@ -1 +1 @@
{"version":3,"file":"btc.js","sourceRoot":"","sources":["../../../api/bots/btc.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAoC;AACpC,oDAAoD;AACpD,oCAAmC;AACnC,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAA;AAE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2
dist/api/controllers/actions.js

@ -124,7 +124,7 @@ function finalAction(a) {
chat: theChat, chat: theChat,
sender: Object.assign(Object.assign({}, owner.dataValues), { alias, id: botContactId }), sender: Object.assign(Object.assign({}, owner.dataValues), { alias, id: botContactId }),
message: { content: textMap, id: message.id, uuid: message.uuid }, message: { content: textMap, id: message.id, uuid: message.uuid },
type: constants.message_types.message, type: constants.message_types.bot_res,
success: () => ({ success: true }), success: () => ({ success: true }),
failure: (e) => { failure: (e) => {
throw e; throw e;

Loading…
Cancel
Save