Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / services / routing / server / applications / message.js
index f29fa1a..3c9e59a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb21=['stringify','stop','lodash','./utils','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','chat','ChatWebsiteId','account','channel','AccountId','upperFirst','InteractionId','interaction','Message','create','then','info','[%s][MESSAGE]\x20%s','next','catch','error'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0xdb21,0xcd));var _0x1db2=function(_0x214d54,_0x133c72){_0x214d54=_0x214d54-0x0;var _0x44ca46=_0xdb21[_0x214d54];return _0x44ca46;};'use strict';var _=require(_0x1db2('0x0'));var utils=require(_0x1db2('0x1'));var logger=require('../../../../config/logger')(_0x1db2('0x2'));var rpc={'chatMessage':require(_0x1db2('0x3')),'openchannelMessage':require(_0x1db2('0x4')),'mailMessage':require(_0x1db2('0x5')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x1db2('0x6')),'whatsappMessage':require(_0x1db2('0x7'))};exports[_0x1db2('0x8')]=function(_0x4732b6,_0x23784b){return function(_0x1f5184){try{var _0x2091b4={'body':utils[_0x1db2('0x9')](_0x23784b[0x0],this),'ContactId':this[_0x1db2('0xa')]['id']};if(this['channel']===_0x1db2('0xb')){_0x2091b4[_0x1db2('0xc')]=this[_0x1db2('0xd')]['id'];}else{_0x2091b4[_['upperFirst'](this[_0x1db2('0xe')])+_0x1db2('0xf')]=this[_0x1db2('0xd')]['id'];}_0x2091b4[_[_0x1db2('0x10')](this[_0x1db2('0xe')])+_0x1db2('0x11')]=this[_0x1db2('0x12')]['id'];if(rpc[this[_0x1db2('0xe')]+'Message']){return rpc[this[_0x1db2('0xe')]+_0x1db2('0x13')][_0x1db2('0x14')](_0x2091b4)[_0x1db2('0x15')](function(_0x93baf7){logger[_0x1db2('0x16')](_0x1db2('0x17'),_0x4732b6,_0x2091b4['body']);_0x1f5184[_0x1db2('0x18')]();})[_0x1db2('0x19')](function(_0x414336){logger[_0x1db2('0x1a')](_0x1db2('0x17'),_0x4732b6,JSON[_0x1db2('0x1b')](_0x414336));_0x1f5184[_0x1db2('0x1c')]();});}}catch(_0x371737){logger[_0x1db2('0x1a')](_0x1db2('0x17'),_0x4732b6,JSON[_0x1db2('0x1b')](_0x371737));_0x1f5184[_0x1db2('0x1c')]();}};};
\ No newline at end of file
+var _0x5fbb=['interaction','Message','create','then','[%s][MESSAGE]\x20%s','body','next','catch','stringify','error','lodash','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','account','AccountId'];(function(_0x24bfc8,_0x9bda97){var _0x2b22ab=function(_0x256de0){while(--_0x256de0){_0x24bfc8['push'](_0x24bfc8['shift']());}};_0x2b22ab(++_0x9bda97);}(_0x5fbb,0x1ba));var _0xb5fb=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x5fbb[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0xb5fb('0x0'));var utils=require('./utils');var logger=require('../../../../config/logger')('routing');var rpc={'chatMessage':require(_0xb5fb('0x1')),'openchannelMessage':require(_0xb5fb('0x2')),'mailMessage':require(_0xb5fb('0x3')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0xb5fb('0x4')),'whatsappMessage':require(_0xb5fb('0x5'))};exports[_0xb5fb('0x6')]=function(_0x104cac,_0x453a98){return function(_0x828d58){try{var _0x3831bd={'body':utils[_0xb5fb('0x7')](_0x453a98[0x0],this),'ContactId':this[_0xb5fb('0x8')]['id']};if(this[_0xb5fb('0x9')]===_0xb5fb('0xa')){_0x3831bd[_0xb5fb('0xb')]=this[_0xb5fb('0xc')]['id'];}else{_0x3831bd[_['upperFirst'](this[_0xb5fb('0x9')])+_0xb5fb('0xd')]=this[_0xb5fb('0xc')]['id'];}_0x3831bd[_['upperFirst'](this['channel'])+'InteractionId']=this[_0xb5fb('0xe')]['id'];if(rpc[this[_0xb5fb('0x9')]+'Message']){return rpc[this[_0xb5fb('0x9')]+_0xb5fb('0xf')][_0xb5fb('0x10')](_0x3831bd)[_0xb5fb('0x11')](function(_0x1e0b38){logger['info'](_0xb5fb('0x12'),_0x104cac,_0x3831bd[_0xb5fb('0x13')]);_0x828d58[_0xb5fb('0x14')]();})[_0xb5fb('0x15')](function(_0x2362b2){logger['error'](_0xb5fb('0x12'),_0x104cac,JSON[_0xb5fb('0x16')](_0x2362b2));_0x828d58['stop']();});}}catch(_0x28e8e8){logger[_0xb5fb('0x17')]('[%s][MESSAGE]\x20%s',_0x104cac,JSON[_0xb5fb('0x16')](_0x28e8e8));_0x828d58['stop']();}};};
\ No newline at end of file