Built motion from commit e02f907f.|2.6.14
[motion2.git] / server / services / routing / server / applications / message.js
index b89d1ec..2472fbb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x01f6=['../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','getMustacheRender','channel','chat','ChatWebsiteId','account','upperFirst','InteractionId','interaction','Message','create','then','info','[%s][MESSAGE]\x20%s','body','next','catch','stringify','stop','error'];(function(_0x269094,_0x4701b3){var _0x10344f=function(_0x180a69){while(--_0x180a69){_0x269094['push'](_0x269094['shift']());}};_0x10344f(++_0x4701b3);}(_0x01f6,0xea));var _0x601f=function(_0x2b07a1,_0x25c79a){_0x2b07a1=_0x2b07a1-0x0;var _0x4bb96b=_0x01f6[_0x2b07a1];return _0x4bb96b;};'use strict';var _=require('lodash');var utils=require('./utils');var logger=require(_0x601f('0x0'))(_0x601f('0x1'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0x601f('0x2')),'mailMessage':require(_0x601f('0x3')),'smsMessage':require(_0x601f('0x4')),'faxMessage':require(_0x601f('0x5')),'whatsappMessage':require(_0x601f('0x6'))};exports['consequence']=function(_0x8f542,_0x5724a2){return function(_0x824bec){try{var _0x4822c4={'body':utils[_0x601f('0x7')](_0x5724a2[0x0],this),'ContactId':this['contact']['id']};if(this[_0x601f('0x8')]===_0x601f('0x9')){_0x4822c4[_0x601f('0xa')]=this[_0x601f('0xb')]['id'];}else{_0x4822c4[_[_0x601f('0xc')](this[_0x601f('0x8')])+'AccountId']=this['account']['id'];}_0x4822c4[_['upperFirst'](this['channel'])+_0x601f('0xd')]=this[_0x601f('0xe')]['id'];if(rpc[this['channel']+_0x601f('0xf')]){return rpc[this[_0x601f('0x8')]+_0x601f('0xf')][_0x601f('0x10')](_0x4822c4)[_0x601f('0x11')](function(_0x5ef0da){logger[_0x601f('0x12')](_0x601f('0x13'),_0x8f542,_0x4822c4[_0x601f('0x14')]);_0x824bec[_0x601f('0x15')]();})[_0x601f('0x16')](function(_0x14770b){logger['error']('[%s][MESSAGE]\x20%s',_0x8f542,JSON[_0x601f('0x17')](_0x14770b));_0x824bec[_0x601f('0x18')]();});}}catch(_0x3e008e){logger[_0x601f('0x19')](_0x601f('0x13'),_0x8f542,JSON[_0x601f('0x17')](_0x3e008e));_0x824bec[_0x601f('0x18')]();}};};
\ No newline at end of file
+var _0xf8aa=['[%s][MESSAGE]\x20%s','body','next','catch','error','stringify','stop','lodash','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','upperFirst','AccountId','account','interaction','Message','create','then','info'];(function(_0x1d96e5,_0x38fff6){var _0x345df0=function(_0x5c6b08){while(--_0x5c6b08){_0x1d96e5['push'](_0x1d96e5['shift']());}};_0x345df0(++_0x38fff6);}(_0xf8aa,0x13b));var _0xaf8a=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0xf8aa[_0x173441];return _0x2423a8;};'use strict';var _=require(_0xaf8a('0x0'));var utils=require('./utils');var logger=require('../../../../config/logger')(_0xaf8a('0x1'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0xaf8a('0x2')),'mailMessage':require(_0xaf8a('0x3')),'smsMessage':require(_0xaf8a('0x4')),'faxMessage':require(_0xaf8a('0x5')),'whatsappMessage':require(_0xaf8a('0x6'))};exports[_0xaf8a('0x7')]=function(_0x33862d,_0x13e8f2){return function(_0xc63b84){try{var _0x2ce005={'body':utils[_0xaf8a('0x8')](_0x13e8f2[0x0],this),'ContactId':this[_0xaf8a('0x9')]['id']};if(this[_0xaf8a('0xa')]===_0xaf8a('0xb')){_0x2ce005[_0xaf8a('0xc')]=this['account']['id'];}else{_0x2ce005[_[_0xaf8a('0xd')](this[_0xaf8a('0xa')])+_0xaf8a('0xe')]=this[_0xaf8a('0xf')]['id'];}_0x2ce005[_[_0xaf8a('0xd')](this[_0xaf8a('0xa')])+'InteractionId']=this[_0xaf8a('0x10')]['id'];if(rpc[this[_0xaf8a('0xa')]+_0xaf8a('0x11')]){return rpc[this[_0xaf8a('0xa')]+_0xaf8a('0x11')][_0xaf8a('0x12')](_0x2ce005)[_0xaf8a('0x13')](function(_0x1eddc9){logger[_0xaf8a('0x14')](_0xaf8a('0x15'),_0x33862d,_0x2ce005[_0xaf8a('0x16')]);_0xc63b84[_0xaf8a('0x17')]();})[_0xaf8a('0x18')](function(_0xea21e8){logger[_0xaf8a('0x19')](_0xaf8a('0x15'),_0x33862d,JSON[_0xaf8a('0x1a')](_0xea21e8));_0xc63b84[_0xaf8a('0x1b')]();});}}catch(_0x51f661){logger[_0xaf8a('0x19')](_0xaf8a('0x15'),_0x33862d,JSON[_0xaf8a('0x1a')](_0x51f661));_0xc63b84[_0xaf8a('0x1b')]();}};};
\ No newline at end of file