Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / services / routing / server / applications / message.js
index 4082bcb..183751e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4c5a=['routing','../../rpc/chatMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','getMustacheRender','channel','chat','ChatWebsiteId','account','AccountId','upperFirst','InteractionId','interaction','Message','then','info','[%s][MESSAGE]\x20%s','body','next','stop','error','stringify','lodash','./utils'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4c5a,0x1c0));var _0xa4c5=function(_0x151e67,_0x41cca0){_0x151e67=_0x151e67-0x0;var _0x8dc7c7=_0x4c5a[_0x151e67];return _0x8dc7c7;};'use strict';var _=require(_0xa4c5('0x0'));var utils=require(_0xa4c5('0x1'));var logger=require('../../../../config/logger')(_0xa4c5('0x2'));var rpc={'chatMessage':require(_0xa4c5('0x3')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0xa4c5('0x4')),'smsMessage':require(_0xa4c5('0x5')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0xa4c5('0x6'))};exports['consequence']=function(_0x4ed3bd,_0x748d28){return function(_0x1141fe){try{var _0x1b7b9e={'body':utils[_0xa4c5('0x7')](_0x748d28[0x0],this),'ContactId':this['contact']['id']};if(this[_0xa4c5('0x8')]===_0xa4c5('0x9')){_0x1b7b9e[_0xa4c5('0xa')]=this[_0xa4c5('0xb')]['id'];}else{_0x1b7b9e[_['upperFirst'](this[_0xa4c5('0x8')])+_0xa4c5('0xc')]=this[_0xa4c5('0xb')]['id'];}_0x1b7b9e[_[_0xa4c5('0xd')](this[_0xa4c5('0x8')])+_0xa4c5('0xe')]=this[_0xa4c5('0xf')]['id'];if(rpc[this[_0xa4c5('0x8')]+_0xa4c5('0x10')]){return rpc[this[_0xa4c5('0x8')]+_0xa4c5('0x10')]['create'](_0x1b7b9e)[_0xa4c5('0x11')](function(_0x1ee5b6){logger[_0xa4c5('0x12')](_0xa4c5('0x13'),_0x4ed3bd,_0x1b7b9e[_0xa4c5('0x14')]);_0x1141fe[_0xa4c5('0x15')]();})['catch'](function(_0x44c912){logger['error'](_0xa4c5('0x13'),_0x4ed3bd,JSON['stringify'](_0x44c912));_0x1141fe[_0xa4c5('0x16')]();});}}catch(_0x47bc0c){logger[_0xa4c5('0x17')](_0xa4c5('0x13'),_0x4ed3bd,JSON[_0xa4c5('0x18')](_0x47bc0c));_0x1141fe[_0xa4c5('0x16')]();}};};
\ No newline at end of file
+var _0xa1e0=['AccountId','upperFirst','interaction','then','[%s][MESSAGE]\x20%s','body','next','stop','error','stringify','lodash','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','getMustacheRender','contact','channel','chat','ChatWebsiteId','account'];(function(_0x4c8e5c,_0x35a3e0){var _0x208ed9=function(_0x7480fa){while(--_0x7480fa){_0x4c8e5c['push'](_0x4c8e5c['shift']());}};_0x208ed9(++_0x35a3e0);}(_0xa1e0,0xb2));var _0x0a1e=function(_0x41890f,_0x458a43){_0x41890f=_0x41890f-0x0;var _0x497002=_0xa1e0[_0x41890f];return _0x497002;};'use strict';var _=require(_0x0a1e('0x0'));var utils=require(_0x0a1e('0x1'));var logger=require(_0x0a1e('0x2'))(_0x0a1e('0x3'));var rpc={'chatMessage':require(_0x0a1e('0x4')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x0a1e('0x5')),'smsMessage':require(_0x0a1e('0x6')),'faxMessage':require(_0x0a1e('0x7')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports['consequence']=function(_0x2054cf,_0x640b32){return function(_0x1e8b18){try{var _0xb5c7d7={'body':utils[_0x0a1e('0x8')](_0x640b32[0x0],this),'ContactId':this[_0x0a1e('0x9')]['id']};if(this[_0x0a1e('0xa')]===_0x0a1e('0xb')){_0xb5c7d7[_0x0a1e('0xc')]=this[_0x0a1e('0xd')]['id'];}else{_0xb5c7d7[_['upperFirst'](this[_0x0a1e('0xa')])+_0x0a1e('0xe')]=this[_0x0a1e('0xd')]['id'];}_0xb5c7d7[_[_0x0a1e('0xf')](this[_0x0a1e('0xa')])+'InteractionId']=this[_0x0a1e('0x10')]['id'];if(rpc[this[_0x0a1e('0xa')]+'Message']){return rpc[this[_0x0a1e('0xa')]+'Message']['create'](_0xb5c7d7)[_0x0a1e('0x11')](function(_0x5e1b05){logger['info'](_0x0a1e('0x12'),_0x2054cf,_0xb5c7d7[_0x0a1e('0x13')]);_0x1e8b18[_0x0a1e('0x14')]();})['catch'](function(_0xb4a1f0){logger['error'](_0x0a1e('0x12'),_0x2054cf,JSON['stringify'](_0xb4a1f0));_0x1e8b18[_0x0a1e('0x15')]();});}}catch(_0x3bed57){logger[_0x0a1e('0x16')](_0x0a1e('0x12'),_0x2054cf,JSON[_0x0a1e('0x17')](_0x3bed57));_0x1e8b18['stop']();}};};
\ No newline at end of file