diff --git a/api/controllers/actions.ts b/api/controllers/actions.ts index 81ca860..3b63515 100644 --- a/api/controllers/actions.ts +++ b/api/controllers/actions.ts @@ -48,9 +48,13 @@ export async function processAction(req, res) { } const a:Action = { - action, pubkey, content, amount, - bot_name:bot.name, chat_uuid, - bot_id + bot_id, + action, + pubkey: pubkey||'', + content: content||'', + amount: amount||0, + bot_name: bot.name, + chat_uuid: chat_uuid||'', } try { @@ -63,12 +67,13 @@ export async function processAction(req, res) { export async function finalAction(a:Action, bot_id:string){ const {action,pubkey,amount,content,bot_name,chat_uuid} = a - if (!chat_uuid) throw 'no chat_uuid' const owner = await models.Contact.findOne({ where: { isOwner: true } }) - let theChat = await models.Chat.findOne({ where: { uuid: chat_uuid } }) - + let theChat + if(chat_uuid){ + theChat = await models.Chat.findOne({ where: { uuid: chat_uuid } }) + } const iAmTribeAdmin = owner.publicKey === (theChat && theChat.ownerPubkey) console.log("=> ACTION HIT", a.action, a.bot_name) if(!iAmTribeAdmin) { // IM NOT ADMIN - its my bot and i need to forward to admin diff --git a/dist/api/controllers/actions.js b/dist/api/controllers/actions.js index e9de6b4..f078ad7 100644 --- a/dist/api/controllers/actions.js +++ b/dist/api/controllers/actions.js @@ -49,9 +49,13 @@ function processAction(req, res) { return res_1.failure(res, 'no action'); } const a = { - action, pubkey, content, amount, - bot_name: bot.name, chat_uuid, - bot_id + bot_id, + action, + pubkey: pubkey || '', + content: content || '', + amount: amount || 0, + bot_name: bot.name, + chat_uuid: chat_uuid || '', }; try { const r = yield finalAction(a, bot_id); @@ -66,10 +70,11 @@ exports.processAction = processAction; function finalAction(a, bot_id) { return __awaiter(this, void 0, void 0, function* () { const { action, pubkey, amount, content, bot_name, chat_uuid } = a; - if (!chat_uuid) - throw 'no chat_uuid'; const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); - let theChat = yield models_1.models.Chat.findOne({ where: { uuid: chat_uuid } }); + let theChat; + if (chat_uuid) { + theChat = yield models_1.models.Chat.findOne({ where: { uuid: chat_uuid } }); + } const iAmTribeAdmin = owner.publicKey === (theChat && theChat.ownerPubkey); console.log("=> ACTION HIT", a.action, a.bot_name); if (!iAmTribeAdmin) { // IM NOT ADMIN - its my bot and i need to forward to admin diff --git a/dist/api/controllers/actions.js.map b/dist/api/controllers/actions.js.map index c0aead4..1a4c1a0 100644 --- a/dist/api/controllers/actions.js.map +++ b/dist/api/controllers/actions.js.map @@ -1 +1 @@ -{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../api/controllers/actions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,sCAAqC;AACrC,sCAAkC;AAClC,oCAAmC;AACnC,qCAAoC;AACpC,2CAA0C;AAC1C,0CAAyC;AACzC,sCAA+C;AAE/C;;;EAGE;AAEF,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAY9E,SAAsB,aAAa,CAAC,GAAG,EAAE,GAAG;;QACxC,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YACpE,IAAI,EAAE,uDAAuD;gBACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;gBACzD,IAAI,QAAQ;oBAAE,IAAI,GAAG,QAAQ,CAAA;aAChC;YAAC,OAAO,CAAC,EAAE;gBACR,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBACd,OAAO,aAAO,CAAC,GAAG,EAAE,mCAAmC,CAAC,CAAA;aAC3D;SACJ;QACD,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,O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AAS;gBACf,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC;aAC7D,CAAC,CAAA;YACF,MAAM,OAAO,CAAC,WAAW,CAAC;gBACtB,IAAI,EAAE,OAAO;gBACb,MAAM,kCAAO,KAAK,CAAC,UAAU,KAAE,KAAK,EAAE,EAAE,EAAC,YAAY,GAAE;gBACvD,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE;gBACjE,IAAI,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO;gBACrC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gBAClC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACX,MAAM,CAAC,CAAA;gBACX,CAAC;aACJ,CAAC,CAAA;SAEL;aAAM;YACH,MAAM,WAAW,CAAA;SACpB;IACL,CAAC;CAAA;AA3GD,kCA2GC"} \ No newline at end of file +{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../api/controllers/actions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,sCAAqC;AACrC,sCAAkC;AAClC,oCAAmC;AACnC,qCAAoC;AACpC,2CAA0C;AAC1C,0CAAyC;AACzC,sCAA+C;AAE/C;;;EAGE;AAEF,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAY9E,SAAsB,aAAa,CAAC,GAAG,EAAE,GAAG;;QACxC,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YACpE,IAAI,EAAE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