Built motion from commit ab870f9e.|2.5.44
[motion2.git] / server / services / routing / server / applications / message.js
index c307b53..2520f5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x806f=['routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','consequence','contact','channel','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','Message','create','then','info','next','error','[%s][MESSAGE]\x20%s','stringify','lodash','./utils','../../../../config/logger'];(function(_0x47f7e3,_0x523181){var _0x26de13=function(_0x375a9b){while(--_0x375a9b){_0x47f7e3['push'](_0x47f7e3['shift']());}};_0x26de13(++_0x523181);}(_0x806f,0x1a6));var _0xf806=function(_0x20268b,_0x6441e3){_0x20268b=_0x20268b-0x0;var _0x23b964=_0x806f[_0x20268b];return _0x23b964;};'use strict';var _=require(_0xf806('0x0'));var utils=require(_0xf806('0x1'));var logger=require(_0xf806('0x2'))(_0xf806('0x3'));var rpc={'chatMessage':require(_0xf806('0x4')),'openchannelMessage':require(_0xf806('0x5')),'mailMessage':require(_0xf806('0x6')),'smsMessage':require(_0xf806('0x7')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0xf806('0x8'))};exports[_0xf806('0x9')]=function(_0x1a1879,_0xe89aac){return function(_0x4b4aa2){try{var _0x5bcaee={'body':utils['getMustacheRender'](_0xe89aac[0x0],this),'ContactId':this[_0xf806('0xa')]['id']};if(this[_0xf806('0xb')]==='chat'){_0x5bcaee[_0xf806('0xc')]=this[_0xf806('0xd')]['id'];}else{_0x5bcaee[_[_0xf806('0xe')](this[_0xf806('0xb')])+_0xf806('0xf')]=this[_0xf806('0xd')]['id'];}_0x5bcaee[_[_0xf806('0xe')](this['channel'])+_0xf806('0x10')]=this['interaction']['id'];if(rpc[this[_0xf806('0xb')]+_0xf806('0x11')]){return rpc[this[_0xf806('0xb')]+'Message'][_0xf806('0x12')](_0x5bcaee)[_0xf806('0x13')](function(_0x17a2ca){logger[_0xf806('0x14')]('[%s][MESSAGE]\x20%s',_0x1a1879,_0x5bcaee['body']);_0x4b4aa2[_0xf806('0x15')]();})['catch'](function(_0x353472){logger[_0xf806('0x16')](_0xf806('0x17'),_0x1a1879,JSON[_0xf806('0x18')](_0x353472));_0x4b4aa2['stop']();});}}catch(_0x38a4c3){logger[_0xf806('0x16')](_0xf806('0x17'),_0x1a1879,JSON[_0xf806('0x18')](_0x38a4c3));_0x4b4aa2['stop']();}};};
\ No newline at end of file
+var _0x11fa=['Message','create','then','info','[%s][MESSAGE]\x20%s','body','catch','error','stringify','stop','lodash','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','upperFirst','AccountId','account','InteractionId'];(function(_0x1c37a5,_0x59ee51){var _0x389d03=function(_0x51b4f4){while(--_0x51b4f4){_0x1c37a5['push'](_0x1c37a5['shift']());}};_0x389d03(++_0x59ee51);}(_0x11fa,0xa0));var _0xa11f=function(_0x36884e,_0x48008f){_0x36884e=_0x36884e-0x0;var _0x1cc367=_0x11fa[_0x36884e];return _0x1cc367;};'use strict';var _=require(_0xa11f('0x0'));var utils=require(_0xa11f('0x1'));var logger=require(_0xa11f('0x2'))(_0xa11f('0x3'));var rpc={'chatMessage':require(_0xa11f('0x4')),'openchannelMessage':require(_0xa11f('0x5')),'mailMessage':require(_0xa11f('0x6')),'smsMessage':require(_0xa11f('0x7')),'faxMessage':require(_0xa11f('0x8')),'whatsappMessage':require(_0xa11f('0x9'))};exports[_0xa11f('0xa')]=function(_0x2e79f3,_0x550d8c){return function(_0x4e42d3){try{var _0x10d3be={'body':utils[_0xa11f('0xb')](_0x550d8c[0x0],this),'ContactId':this[_0xa11f('0xc')]['id']};if(this[_0xa11f('0xd')]===_0xa11f('0xe')){_0x10d3be[_0xa11f('0xf')]=this['account']['id'];}else{_0x10d3be[_[_0xa11f('0x10')](this[_0xa11f('0xd')])+_0xa11f('0x11')]=this[_0xa11f('0x12')]['id'];}_0x10d3be[_[_0xa11f('0x10')](this[_0xa11f('0xd')])+_0xa11f('0x13')]=this['interaction']['id'];if(rpc[this['channel']+'Message']){return rpc[this[_0xa11f('0xd')]+_0xa11f('0x14')][_0xa11f('0x15')](_0x10d3be)[_0xa11f('0x16')](function(_0x426aa5){logger[_0xa11f('0x17')](_0xa11f('0x18'),_0x2e79f3,_0x10d3be[_0xa11f('0x19')]);_0x4e42d3['next']();})[_0xa11f('0x1a')](function(_0x197738){logger[_0xa11f('0x1b')](_0xa11f('0x18'),_0x2e79f3,JSON[_0xa11f('0x1c')](_0x197738));_0x4e42d3[_0xa11f('0x1d')]();});}}catch(_0x5e1e4e){logger['error']('[%s][MESSAGE]\x20%s',_0x2e79f3,JSON[_0xa11f('0x1c')](_0x5e1e4e));_0x4e42d3['stop']();}};};
\ No newline at end of file