Built motion from commit (unavailable).|2.5.17
[motion2.git] / server / services / routing / server / applications / message.js
index 1f6ebde..f73b479 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc93=['body','next','catch','error','stop','stringify','lodash','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','account','upperFirst','AccountId','channel','InteractionId','interaction','Message','then','info','[%s][MESSAGE]\x20%s'];(function(_0x30f030,_0xd03b7a){var _0xf7614f=function(_0x261cac){while(--_0x261cac){_0x30f030['push'](_0x30f030['shift']());}};_0xf7614f(++_0xd03b7a);}(_0xdc93,0x6e));var _0x3dc9=function(_0x4358f5,_0x5b1ac6){_0x4358f5=_0x4358f5-0x0;var _0x4d8104=_0xdc93[_0x4358f5];return _0x4d8104;};'use strict';var _=require(_0x3dc9('0x0'));var utils=require(_0x3dc9('0x1'));var logger=require(_0x3dc9('0x2'))(_0x3dc9('0x3'));var rpc={'chatMessage':require(_0x3dc9('0x4')),'openchannelMessage':require(_0x3dc9('0x5')),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0x3dc9('0x6')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0x3dc9('0x7'))};exports[_0x3dc9('0x8')]=function(_0x42729b,_0x3e4e8a){return function(_0x2e17a3){try{var _0x58b3bc={'body':utils[_0x3dc9('0x9')](_0x3e4e8a[0x0],this),'ContactId':this['contact']['id']};if(this['channel']==='chat'){_0x58b3bc['ChatWebsiteId']=this[_0x3dc9('0xa')]['id'];}else{_0x58b3bc[_[_0x3dc9('0xb')](this['channel'])+_0x3dc9('0xc')]=this[_0x3dc9('0xa')]['id'];}_0x58b3bc[_['upperFirst'](this[_0x3dc9('0xd')])+_0x3dc9('0xe')]=this[_0x3dc9('0xf')]['id'];if(rpc[this[_0x3dc9('0xd')]+_0x3dc9('0x10')]){return rpc[this[_0x3dc9('0xd')]+_0x3dc9('0x10')]['create'](_0x58b3bc)[_0x3dc9('0x11')](function(_0x4674e0){logger[_0x3dc9('0x12')](_0x3dc9('0x13'),_0x42729b,_0x58b3bc[_0x3dc9('0x14')]);_0x2e17a3[_0x3dc9('0x15')]();})[_0x3dc9('0x16')](function(_0x287faf){logger[_0x3dc9('0x17')](_0x3dc9('0x13'),_0x42729b,JSON['stringify'](_0x287faf));_0x2e17a3[_0x3dc9('0x18')]();});}}catch(_0x311173){logger['error'](_0x3dc9('0x13'),_0x42729b,JSON[_0x3dc9('0x19')](_0x311173));_0x2e17a3[_0x3dc9('0x18')]();}};};
\ No newline at end of file
+var _0xaa7f=['../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','Message','then','info','[%s][MESSAGE]\x20%s','next','error','stringify','stop','lodash','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage'];(function(_0x28d18d,_0x55896b){var _0x470640=function(_0x57e78b){while(--_0x57e78b){_0x28d18d['push'](_0x28d18d['shift']());}};_0x470640(++_0x55896b);}(_0xaa7f,0x166));var _0xfaa7=function(_0x331dd0,_0x2f07d4){_0x331dd0=_0x331dd0-0x0;var _0x2f0567=_0xaa7f[_0x331dd0];return _0x2f0567;};'use strict';var _=require(_0xfaa7('0x0'));var utils=require('./utils');var logger=require(_0xfaa7('0x1'))(_0xfaa7('0x2'));var rpc={'chatMessage':require(_0xfaa7('0x3')),'openchannelMessage':require(_0xfaa7('0x4')),'mailMessage':require(_0xfaa7('0x5')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0xfaa7('0x6')),'whatsappMessage':require(_0xfaa7('0x7'))};exports[_0xfaa7('0x8')]=function(_0x469d50,_0x3ba449){return function(_0x5338a8){try{var _0x2b88e3={'body':utils[_0xfaa7('0x9')](_0x3ba449[0x0],this),'ContactId':this[_0xfaa7('0xa')]['id']};if(this[_0xfaa7('0xb')]===_0xfaa7('0xc')){_0x2b88e3[_0xfaa7('0xd')]=this[_0xfaa7('0xe')]['id'];}else{_0x2b88e3[_[_0xfaa7('0xf')](this[_0xfaa7('0xb')])+_0xfaa7('0x10')]=this['account']['id'];}_0x2b88e3[_[_0xfaa7('0xf')](this[_0xfaa7('0xb')])+_0xfaa7('0x11')]=this['interaction']['id'];if(rpc[this[_0xfaa7('0xb')]+_0xfaa7('0x12')]){return rpc[this[_0xfaa7('0xb')]+_0xfaa7('0x12')]['create'](_0x2b88e3)[_0xfaa7('0x13')](function(_0x242891){logger[_0xfaa7('0x14')](_0xfaa7('0x15'),_0x469d50,_0x2b88e3['body']);_0x5338a8[_0xfaa7('0x16')]();})['catch'](function(_0x417728){logger[_0xfaa7('0x17')](_0xfaa7('0x15'),_0x469d50,JSON[_0xfaa7('0x18')](_0x417728));_0x5338a8[_0xfaa7('0x19')]();});}}catch(_0x1e2028){logger[_0xfaa7('0x17')](_0xfaa7('0x15'),_0x469d50,JSON['stringify'](_0x1e2028));_0x5338a8[_0xfaa7('0x19')]();}};};
\ No newline at end of file