Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / services / routing / server / applications / message.js
index f29fa1a..1ebedb0 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 _0xf6f6=['channel','AccountId','account','InteractionId','interaction','Message','create','then','info','[%s][MESSAGE]\x20%s','next','error','stringify','stop','lodash','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','consequence','getMustacheRender','contact','chat','ChatWebsiteId','upperFirst'];(function(_0x1b70e3,_0x3a15b1){var _0x1452ab=function(_0x692883){while(--_0x692883){_0x1b70e3['push'](_0x1b70e3['shift']());}};_0x1452ab(++_0x3a15b1);}(_0xf6f6,0x15e));var _0x6f6f=function(_0x3b7b8a,_0x52c3b0){_0x3b7b8a=_0x3b7b8a-0x0;var _0x441206=_0xf6f6[_0x3b7b8a];return _0x441206;};'use strict';var _=require(_0x6f6f('0x0'));var utils=require('./utils');var logger=require(_0x6f6f('0x1'))(_0x6f6f('0x2'));var rpc={'chatMessage':require(_0x6f6f('0x3')),'openchannelMessage':require(_0x6f6f('0x4')),'mailMessage':require(_0x6f6f('0x5')),'smsMessage':require(_0x6f6f('0x6')),'faxMessage':require(_0x6f6f('0x7')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x6f6f('0x8')]=function(_0x32526a,_0xa2d4e7){return function(_0xa0a462){try{var _0x3a2da7={'body':utils[_0x6f6f('0x9')](_0xa2d4e7[0x0],this),'ContactId':this[_0x6f6f('0xa')]['id']};if(this['channel']===_0x6f6f('0xb')){_0x3a2da7[_0x6f6f('0xc')]=this['account']['id'];}else{_0x3a2da7[_[_0x6f6f('0xd')](this[_0x6f6f('0xe')])+_0x6f6f('0xf')]=this[_0x6f6f('0x10')]['id'];}_0x3a2da7[_[_0x6f6f('0xd')](this[_0x6f6f('0xe')])+_0x6f6f('0x11')]=this[_0x6f6f('0x12')]['id'];if(rpc[this['channel']+_0x6f6f('0x13')]){return rpc[this['channel']+'Message'][_0x6f6f('0x14')](_0x3a2da7)[_0x6f6f('0x15')](function(_0x5f1fc5){logger[_0x6f6f('0x16')](_0x6f6f('0x17'),_0x32526a,_0x3a2da7['body']);_0xa0a462[_0x6f6f('0x18')]();})['catch'](function(_0x2482d6){logger[_0x6f6f('0x19')](_0x6f6f('0x17'),_0x32526a,JSON['stringify'](_0x2482d6));_0xa0a462['stop']();});}}catch(_0x34a259){logger[_0x6f6f('0x19')]('[%s][MESSAGE]\x20%s',_0x32526a,JSON[_0x6f6f('0x1a')](_0x34a259));_0xa0a462[_0x6f6f('0x1b')]();}};};
\ No newline at end of file