Built motion from commit a61a4a20.|2.5.46
[motion2.git] / server / services / routing / server / applications / tag.js
index 8542349..cd514de 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6443=['Interaction','addTags','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','stringify','finally','isObject','lodash','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','routing','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','validate','[%s][TAG]\x20%s','map','message','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','channel'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6443,0xe0));var _0x3644=function(_0x5e1b91,_0x236f17){_0x5e1b91=_0x5e1b91-0x0;var _0x59b52f=_0x6443[_0x5e1b91];return _0x59b52f;};'use strict';var schema=require('validate');var _=require(_0x3644('0x0'));var rpc={'chatInteraction':require(_0x3644('0x1')),'openchannelInteraction':require(_0x3644('0x2')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0x3644('0x3')),'whatsappInteraction':require(_0x3644('0x4'))};var logger=require('../../../../config/logger')(_0x3644('0x5'));var tag=schema({'tag':{'type':'number','required':!![],'message':_0x3644('0x6')}});exports[_0x3644('0x7')]=function(_0x15b88f,_0x120c2a,_0x276934,_0x21eab7){return function(_0x7bd5ed){try{var _0x5a40e6={'tag':_0x120c2a[0x0]};var _0x7fcbb5=tag[_0x3644('0x8')](_0x5a40e6,{'typecast':!![]});if(_0x7fcbb5['length']){logger['error'](_0x3644('0x9'),_0x15b88f,_[_0x3644('0xa')](_0x7fcbb5,_0x3644('0xb'))['join'](',\x20'));logger[_0x3644('0xc')](_0x3644('0xd'),_0x15b88f);_0x7bd5ed[_0x3644('0xe')]();}else{var _0x1151fe={'ids':[_0x120c2a[0x0]]};if(rpc[_0x21eab7[_0x3644('0xf')]+'Interaction']){rpc[_0x21eab7[_0x3644('0xf')]+_0x3644('0x10')][_0x3644('0x11')](_0x21eab7[_0x3644('0x12')]['id'],_0x1151fe)[_0x3644('0x13')](function(_0x499ee7){logger[_0x3644('0xc')](_0x3644('0x14'),_0x15b88f,_0x120c2a[0x1],_0x21eab7[_0x3644('0xf')],_0x21eab7[_0x3644('0x12')]['id']);})['catch'](function(_0x18b1d2){logger['error']('[%s][TAG]\x20%s',_0x15b88f,JSON[_0x3644('0x15')](_0x18b1d2));logger[_0x3644('0xc')](_0x3644('0xd'),_0x15b88f);})[_0x3644('0x16')](function(){_0x7bd5ed[_0x3644('0xe')]();});}}}catch(_0x290909){logger['error'](_0x3644('0x9'),_0x15b88f,_[_0x3644('0x17')](_0x290909)?JSON[_0x3644('0x15')](_0x290909):_0x290909);logger[_0x3644('0xc')](_0x3644('0xd'),_0x15b88f);_0x7bd5ed['next']();}};};
\ No newline at end of file
+var _0x0fd5=['channel','Interaction','addTags','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','catch','stringify','finally','isObject','validate','lodash','../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','routing','number','consequence','length','error','[%s][TAG]\x20%s','message','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next'];(function(_0x3aff45,_0x3e529e){var _0x2d3359=function(_0x1f1803){while(--_0x1f1803){_0x3aff45['push'](_0x3aff45['shift']());}};_0x2d3359(++_0x3e529e);}(_0x0fd5,0x122));var _0x50fd=function(_0x1734fc,_0x453703){_0x1734fc=_0x1734fc-0x0;var _0x56ce16=_0x0fd5[_0x1734fc];return _0x56ce16;};'use strict';var schema=require(_0x50fd('0x0'));var _=require(_0x50fd('0x1'));var rpc={'chatInteraction':require(_0x50fd('0x2')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x50fd('0x3')),'mailInteraction':require(_0x50fd('0x4')),'faxInteraction':require(_0x50fd('0x5')),'whatsappInteraction':require(_0x50fd('0x6'))};var logger=require('../../../../config/logger')(_0x50fd('0x7'));var tag=schema({'tag':{'type':_0x50fd('0x8'),'required':!![],'message':'TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required'}});exports[_0x50fd('0x9')]=function(_0x22a13e,_0x28a59d,_0x223032,_0x35f26d){return function(_0x54680b){try{var _0x167de6={'tag':_0x28a59d[0x0]};var _0x7003cc=tag[_0x50fd('0x0')](_0x167de6,{'typecast':!![]});if(_0x7003cc[_0x50fd('0xa')]){logger[_0x50fd('0xb')](_0x50fd('0xc'),_0x22a13e,_['map'](_0x7003cc,_0x50fd('0xd'))[_0x50fd('0xe')](',\x20'));logger[_0x50fd('0xf')](_0x50fd('0x10'),_0x22a13e);_0x54680b[_0x50fd('0x11')]();}else{var _0x27f209={'ids':[_0x28a59d[0x0]]};if(rpc[_0x35f26d[_0x50fd('0x12')]+_0x50fd('0x13')]){rpc[_0x35f26d[_0x50fd('0x12')]+_0x50fd('0x13')][_0x50fd('0x14')](_0x35f26d[_0x50fd('0x15')]['id'],_0x27f209)[_0x50fd('0x16')](function(_0x3ce2bf){logger['info'](_0x50fd('0x17'),_0x22a13e,_0x28a59d[0x1],_0x35f26d[_0x50fd('0x12')],_0x35f26d[_0x50fd('0x15')]['id']);})[_0x50fd('0x18')](function(_0x1b1ab4){logger[_0x50fd('0xb')]('[%s][TAG]\x20%s',_0x22a13e,JSON[_0x50fd('0x19')](_0x1b1ab4));logger[_0x50fd('0xf')](_0x50fd('0x10'),_0x22a13e);})[_0x50fd('0x1a')](function(){_0x54680b[_0x50fd('0x11')]();});}}}catch(_0x364296){logger['error'](_0x50fd('0xc'),_0x22a13e,_[_0x50fd('0x1b')](_0x364296)?JSON[_0x50fd('0x19')](_0x364296):_0x364296);logger[_0x50fd('0xf')](_0x50fd('0x10'),_0x22a13e);_0x54680b[_0x50fd('0x11')]();}};};
\ No newline at end of file