Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / services / routing / server / applications / message.js
index cdf66f2..a83550c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd758=['[%s][MESSAGE]\x20%s','body','next','catch','stop','error','lodash','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','getMustacheRender','contact','channel','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','interaction','Message','create','then'];(function(_0x4d759f,_0x90bd42){var _0x28c804=function(_0x36d867){while(--_0x36d867){_0x4d759f['push'](_0x4d759f['shift']());}};_0x28c804(++_0x90bd42);}(_0xd758,0x172));var _0x8d75=function(_0x45748f,_0x6de959){_0x45748f=_0x45748f-0x0;var _0x481984=_0xd758[_0x45748f];return _0x481984;};'use strict';var _=require(_0x8d75('0x0'));var utils=require(_0x8d75('0x1'));var logger=require(_0x8d75('0x2'))(_0x8d75('0x3'));var rpc={'chatMessage':require(_0x8d75('0x4')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0x8d75('0x5')),'faxMessage':require(_0x8d75('0x6')),'whatsappMessage':require(_0x8d75('0x7'))};exports['consequence']=function(_0x186c6b,_0xc84607){return function(_0x388960){try{var _0x2c6a33={'body':utils[_0x8d75('0x8')](_0xc84607[0x0],this),'ContactId':this[_0x8d75('0x9')]['id']};if(this[_0x8d75('0xa')]==='chat'){_0x2c6a33[_0x8d75('0xb')]=this[_0x8d75('0xc')]['id'];}else{_0x2c6a33[_[_0x8d75('0xd')](this[_0x8d75('0xa')])+_0x8d75('0xe')]=this[_0x8d75('0xc')]['id'];}_0x2c6a33[_['upperFirst'](this[_0x8d75('0xa')])+_0x8d75('0xf')]=this[_0x8d75('0x10')]['id'];if(rpc[this[_0x8d75('0xa')]+_0x8d75('0x11')]){return rpc[this[_0x8d75('0xa')]+_0x8d75('0x11')][_0x8d75('0x12')](_0x2c6a33)[_0x8d75('0x13')](function(_0x39e226){logger['info'](_0x8d75('0x14'),_0x186c6b,_0x2c6a33[_0x8d75('0x15')]);_0x388960[_0x8d75('0x16')]();})[_0x8d75('0x17')](function(_0x2334de){logger['error'](_0x8d75('0x14'),_0x186c6b,JSON['stringify'](_0x2334de));_0x388960[_0x8d75('0x18')]();});}}catch(_0x33658c){logger[_0x8d75('0x19')](_0x8d75('0x14'),_0x186c6b,JSON['stringify'](_0x33658c));_0x388960[_0x8d75('0x18')]();}};};
\ No newline at end of file
+var _0xd064=['contact','channel','chat','account','upperFirst','AccountId','InteractionId','Message','then','[%s][MESSAGE]\x20%s','next','catch','stringify','stop','error','lodash','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','consequence','getMustacheRender'];(function(_0xcfcc0d,_0x387892){var _0x4a6134=function(_0x46c8c1){while(--_0x46c8c1){_0xcfcc0d['push'](_0xcfcc0d['shift']());}};_0x4a6134(++_0x387892);}(_0xd064,0x91));var _0x4d06=function(_0x1fc18b,_0x13d27d){_0x1fc18b=_0x1fc18b-0x0;var _0x16a351=_0xd064[_0x1fc18b];return _0x16a351;};'use strict';var _=require(_0x4d06('0x0'));var utils=require(_0x4d06('0x1'));var logger=require(_0x4d06('0x2'))(_0x4d06('0x3'));var rpc={'chatMessage':require(_0x4d06('0x4')),'openchannelMessage':require(_0x4d06('0x5')),'mailMessage':require(_0x4d06('0x6')),'smsMessage':require(_0x4d06('0x7')),'faxMessage':require(_0x4d06('0x8')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x4d06('0x9')]=function(_0x22299b,_0x513879){return function(_0x5ac5a8){try{var _0x4e79a2={'body':utils[_0x4d06('0xa')](_0x513879[0x0],this),'ContactId':this[_0x4d06('0xb')]['id']};if(this[_0x4d06('0xc')]===_0x4d06('0xd')){_0x4e79a2['ChatWebsiteId']=this[_0x4d06('0xe')]['id'];}else{_0x4e79a2[_[_0x4d06('0xf')](this[_0x4d06('0xc')])+_0x4d06('0x10')]=this[_0x4d06('0xe')]['id'];}_0x4e79a2[_[_0x4d06('0xf')](this[_0x4d06('0xc')])+_0x4d06('0x11')]=this['interaction']['id'];if(rpc[this[_0x4d06('0xc')]+_0x4d06('0x12')]){return rpc[this[_0x4d06('0xc')]+'Message']['create'](_0x4e79a2)[_0x4d06('0x13')](function(_0x336e21){logger['info'](_0x4d06('0x14'),_0x22299b,_0x4e79a2['body']);_0x5ac5a8[_0x4d06('0x15')]();})[_0x4d06('0x16')](function(_0x54a8b2){logger['error'](_0x4d06('0x14'),_0x22299b,JSON[_0x4d06('0x17')](_0x54a8b2));_0x5ac5a8[_0x4d06('0x18')]();});}}catch(_0x424a92){logger[_0x4d06('0x19')](_0x4d06('0x14'),_0x22299b,JSON['stringify'](_0x424a92));_0x5ac5a8[_0x4d06('0x18')]();}};};
\ No newline at end of file