Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / services / routing / server / applications / tag.js
index 9d58a82..1abcf90 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c7e=['next','channel','Interaction','addTags','interaction','stringify','finally','isObject','validate','lodash','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','error','[%s][TAG]\x20%s','message','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next'];(function(_0x4a8ed9,_0x39f01e){var _0xd63203=function(_0x51f9cc){while(--_0x51f9cc){_0x4a8ed9['push'](_0x4a8ed9['shift']());}};_0xd63203(++_0x39f01e);}(_0x9c7e,0xb0));var _0xe9c7=function(_0x1ee492,_0x44de20){_0x1ee492=_0x1ee492-0x0;var _0x4485cc=_0x9c7e[_0x1ee492];return _0x4485cc;};'use strict';var schema=require(_0xe9c7('0x0'));var _=require(_0xe9c7('0x1'));var rpc={'chatInteraction':require(_0xe9c7('0x2')),'openchannelInteraction':require(_0xe9c7('0x3')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0xe9c7('0x4')),'faxInteraction':require(_0xe9c7('0x5')),'whatsappInteraction':require(_0xe9c7('0x6'))};var logger=require('../../../../config/logger')(_0xe9c7('0x7'));var tag=schema({'tag':{'type':_0xe9c7('0x8'),'required':!![],'message':_0xe9c7('0x9')}});exports['consequence']=function(_0x33cfb8,_0x26c843,_0x155dc8,_0x365965){return function(_0x14f3a6){try{var _0x37aa10={'tag':_0x26c843[0x0]};var _0xd621a=tag[_0xe9c7('0x0')](_0x37aa10,{'typecast':!![]});if(_0xd621a['length']){logger[_0xe9c7('0xa')](_0xe9c7('0xb'),_0x33cfb8,_['map'](_0xd621a,_0xe9c7('0xc'))[_0xe9c7('0xd')](',\x20'));logger[_0xe9c7('0xe')](_0xe9c7('0xf'),_0x33cfb8);_0x14f3a6[_0xe9c7('0x10')]();}else{var _0x59c283={'ids':[_0x26c843[0x0]]};if(rpc[_0x365965[_0xe9c7('0x11')]+_0xe9c7('0x12')]){rpc[_0x365965[_0xe9c7('0x11')]+_0xe9c7('0x12')][_0xe9c7('0x13')](_0x365965[_0xe9c7('0x14')]['id'],_0x59c283)['then'](function(_0x3e5beb){logger[_0xe9c7('0xe')]('[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s',_0x33cfb8,_0x26c843[0x1],_0x365965['channel'],_0x365965[_0xe9c7('0x14')]['id']);})['catch'](function(_0x15d4be){logger[_0xe9c7('0xa')](_0xe9c7('0xb'),_0x33cfb8,JSON[_0xe9c7('0x15')](_0x15d4be));logger[_0xe9c7('0xe')]('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x33cfb8);})[_0xe9c7('0x16')](function(){_0x14f3a6[_0xe9c7('0x10')]();});}}}catch(_0x1b5a51){logger[_0xe9c7('0xa')](_0xe9c7('0xb'),_0x33cfb8,_[_0xe9c7('0x17')](_0x1b5a51)?JSON[_0xe9c7('0x15')](_0x1b5a51):_0x1b5a51);logger[_0xe9c7('0xe')](_0xe9c7('0xf'),_0x33cfb8);_0x14f3a6['next']();}};};
\ No newline at end of file
+var _0x7557=['../../rpc/faxInteraction','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','[%s][TAG]\x20%s','map','message','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','channel','addTags','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','interaction','catch','stringify','finally','isObject','validate','lodash','../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x7557,0x109));var _0x7755=function(_0x2b3f36,_0x14044d){_0x2b3f36=_0x2b3f36-0x0;var _0x5e7d05=_0x7557[_0x2b3f36];return _0x5e7d05;};'use strict';var schema=require(_0x7755('0x0'));var _=require(_0x7755('0x1'));var rpc={'chatInteraction':require(_0x7755('0x2')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x7755('0x3')),'mailInteraction':require(_0x7755('0x4')),'faxInteraction':require(_0x7755('0x5')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};var logger=require('../../../../config/logger')(_0x7755('0x6'));var tag=schema({'tag':{'type':_0x7755('0x7'),'required':!![],'message':_0x7755('0x8')}});exports[_0x7755('0x9')]=function(_0x2ebec7,_0x5ed70b,_0x2d810e,_0x15867c){return function(_0x20ba74){try{var _0x39cea0={'tag':_0x5ed70b[0x0]};var _0x2b23db=tag[_0x7755('0x0')](_0x39cea0,{'typecast':!![]});if(_0x2b23db[_0x7755('0xa')]){logger['error'](_0x7755('0xb'),_0x2ebec7,_[_0x7755('0xc')](_0x2b23db,_0x7755('0xd'))[_0x7755('0xe')](',\x20'));logger[_0x7755('0xf')](_0x7755('0x10'),_0x2ebec7);_0x20ba74[_0x7755('0x11')]();}else{var _0x2252aa={'ids':[_0x5ed70b[0x0]]};if(rpc[_0x15867c[_0x7755('0x12')]+'Interaction']){rpc[_0x15867c[_0x7755('0x12')]+'Interaction'][_0x7755('0x13')](_0x15867c['interaction']['id'],_0x2252aa)[_0x7755('0x14')](function(_0x3f7ade){logger[_0x7755('0xf')](_0x7755('0x15'),_0x2ebec7,_0x5ed70b[0x1],_0x15867c[_0x7755('0x12')],_0x15867c[_0x7755('0x16')]['id']);})[_0x7755('0x17')](function(_0x4eb494){logger['error']('[%s][TAG]\x20%s',_0x2ebec7,JSON[_0x7755('0x18')](_0x4eb494));logger[_0x7755('0xf')](_0x7755('0x10'),_0x2ebec7);})[_0x7755('0x19')](function(){_0x20ba74[_0x7755('0x11')]();});}}}catch(_0x3e5f61){logger['error'](_0x7755('0xb'),_0x2ebec7,_[_0x7755('0x1a')](_0x3e5f61)?JSON[_0x7755('0x18')](_0x3e5f61):_0x3e5f61);logger[_0x7755('0xf')](_0x7755('0x10'),_0x2ebec7);_0x20ba74[_0x7755('0x11')]();}};};
\ No newline at end of file