Built motion from commit ab870f9e.|2.5.44
[motion2.git] / server / services / routing / server / applications / message.js
index 7f813af..2520f5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6da9=['create','then','info','[%s][MESSAGE]\x20%s','next','catch','stringify','stop','lodash','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','consequence','contact','channel','chat','AccountId','account','InteractionId','Message'];(function(_0x4f24db,_0x467a11){var _0x2fe18a=function(_0x3a57f0){while(--_0x3a57f0){_0x4f24db['push'](_0x4f24db['shift']());}};_0x2fe18a(++_0x467a11);}(_0x6da9,0x161));var _0x96da=function(_0x10d45f,_0x4c8f8a){_0x10d45f=_0x10d45f-0x0;var _0x4d4e8c=_0x6da9[_0x10d45f];return _0x4d4e8c;};'use strict';var _=require(_0x96da('0x0'));var utils=require(_0x96da('0x1'));var logger=require(_0x96da('0x2'))(_0x96da('0x3'));var rpc={'chatMessage':require(_0x96da('0x4')),'openchannelMessage':require(_0x96da('0x5')),'mailMessage':require(_0x96da('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x96da('0x7')]=function(_0x3c8e0c,_0x26fdbb){return function(_0x5c4924){try{var _0x1bc4b0={'body':utils['getMustacheRender'](_0x26fdbb[0x0],this),'ContactId':this[_0x96da('0x8')]['id']};if(this[_0x96da('0x9')]===_0x96da('0xa')){_0x1bc4b0['ChatWebsiteId']=this['account']['id'];}else{_0x1bc4b0[_['upperFirst'](this[_0x96da('0x9')])+_0x96da('0xb')]=this[_0x96da('0xc')]['id'];}_0x1bc4b0[_['upperFirst'](this[_0x96da('0x9')])+_0x96da('0xd')]=this['interaction']['id'];if(rpc[this[_0x96da('0x9')]+_0x96da('0xe')]){return rpc[this[_0x96da('0x9')]+_0x96da('0xe')][_0x96da('0xf')](_0x1bc4b0)[_0x96da('0x10')](function(_0x2cdcdf){logger[_0x96da('0x11')](_0x96da('0x12'),_0x3c8e0c,_0x1bc4b0['body']);_0x5c4924[_0x96da('0x13')]();})[_0x96da('0x14')](function(_0x4807b7){logger['error'](_0x96da('0x12'),_0x3c8e0c,JSON[_0x96da('0x15')](_0x4807b7));_0x5c4924['stop']();});}}catch(_0x13f426){logger['error'](_0x96da('0x12'),_0x3c8e0c,JSON[_0x96da('0x15')](_0x13f426));_0x5c4924[_0x96da('0x16')]();}};};
\ 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