Built motion from commit (unavailable).|2.5.17
[motion2.git] / server / services / routing / server / applications / message.js
index 4b97462..f73b479 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x352f=['body','catch','error','[%s][MESSAGE]\x20%s','stringify','stop','lodash','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','contact','channel','chat','account','AccountId','upperFirst','InteractionId','interaction','Message','create','then','info'];(function(_0x12e073,_0x4d43db){var _0x267748=function(_0x381284){while(--_0x381284){_0x12e073['push'](_0x12e073['shift']());}};_0x267748(++_0x4d43db);}(_0x352f,0x1da));var _0xf352=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x352f[_0x21a9d9];return _0x46adce;};'use strict';var _=require(_0xf352('0x0'));var utils=require('./utils');var logger=require(_0xf352('0x1'))(_0xf352('0x2'));var rpc={'chatMessage':require(_0xf352('0x3')),'openchannelMessage':require(_0xf352('0x4')),'mailMessage':require(_0xf352('0x5')),'smsMessage':require(_0xf352('0x6')),'faxMessage':require(_0xf352('0x7'))};exports['consequence']=function(_0x36a31f,_0x53ff9e){return function(_0x14ce81){try{var _0x2e05ac={'body':utils['getMustacheRender'](_0x53ff9e[0x0],this),'ContactId':this[_0xf352('0x8')]['id']};if(this[_0xf352('0x9')]===_0xf352('0xa')){_0x2e05ac['ChatWebsiteId']=this[_0xf352('0xb')]['id'];}else{_0x2e05ac[_['upperFirst'](this[_0xf352('0x9')])+_0xf352('0xc')]=this[_0xf352('0xb')]['id'];}_0x2e05ac[_[_0xf352('0xd')](this[_0xf352('0x9')])+_0xf352('0xe')]=this[_0xf352('0xf')]['id'];if(rpc[this[_0xf352('0x9')]+_0xf352('0x10')]){return rpc[this[_0xf352('0x9')]+_0xf352('0x10')][_0xf352('0x11')](_0x2e05ac)[_0xf352('0x12')](function(_0x2b20c9){logger[_0xf352('0x13')]('[%s][MESSAGE]\x20%s',_0x36a31f,_0x2e05ac[_0xf352('0x14')]);_0x14ce81['next']();})[_0xf352('0x15')](function(_0x1119eb){logger[_0xf352('0x16')](_0xf352('0x17'),_0x36a31f,JSON[_0xf352('0x18')](_0x1119eb));_0x14ce81['stop']();});}}catch(_0x3486ce){logger[_0xf352('0x16')](_0xf352('0x17'),_0x36a31f,JSON[_0xf352('0x18')](_0x3486ce));_0x14ce81[_0xf352('0x19')]();}};};
\ 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