Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / services / routing / server / applications / tag.js
index 3a45bd9..072088c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f08=['stringify','validate','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','../../../../config/logger','routing','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','error','[%s][TAG]\x20%s','map','info','channel','addTags','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','catch','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','isObject'];(function(_0x428377,_0xf1d70d){var _0x143839=function(_0x4522b6){while(--_0x4522b6){_0x428377['push'](_0x428377['shift']());}};_0x143839(++_0xf1d70d);}(_0x3f08,0x121));var _0x83f0=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x3f08[_0x6c993a];return _0x27f547;};'use strict';var schema=require(_0x83f0('0x0'));var _=require('lodash');var rpc={'chatInteraction':require(_0x83f0('0x1')),'openchannelInteraction':require(_0x83f0('0x2')),'smsInteraction':require(_0x83f0('0x3')),'mailInteraction':require(_0x83f0('0x4')),'faxInteraction':require(_0x83f0('0x5')),'whatsappInteraction':require(_0x83f0('0x6'))};var logger=require(_0x83f0('0x7'))(_0x83f0('0x8'));var tag=schema({'tag':{'type':'number','required':!![],'message':_0x83f0('0x9')}});exports[_0x83f0('0xa')]=function(_0x33674f,_0x573c44,_0x5e2bab,_0x2b6cfe){return function(_0x4a6f19){try{var _0x108dd7={'tag':_0x573c44[0x0]};var _0x5a8b38=tag['validate'](_0x108dd7,{'typecast':!![]});if(_0x5a8b38['length']){logger[_0x83f0('0xb')](_0x83f0('0xc'),_0x33674f,_[_0x83f0('0xd')](_0x5a8b38,'message')['join'](',\x20'));logger[_0x83f0('0xe')]('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x33674f);_0x4a6f19['next']();}else{var _0x18596b={'ids':[_0x573c44[0x0]]};if(rpc[_0x2b6cfe[_0x83f0('0xf')]+'Interaction']){rpc[_0x2b6cfe[_0x83f0('0xf')]+'Interaction'][_0x83f0('0x10')](_0x2b6cfe['interaction']['id'],_0x18596b)[_0x83f0('0x11')](function(_0x49f74b){logger[_0x83f0('0xe')](_0x83f0('0x12'),_0x33674f,_0x573c44[0x1],_0x2b6cfe[_0x83f0('0xf')],_0x2b6cfe['interaction']['id']);})[_0x83f0('0x13')](function(_0x54745d){logger[_0x83f0('0xb')](_0x83f0('0xc'),_0x33674f,JSON['stringify'](_0x54745d));logger[_0x83f0('0xe')](_0x83f0('0x14'),_0x33674f);})['finally'](function(){_0x4a6f19[_0x83f0('0x15')]();});}}}catch(_0x383592){logger[_0x83f0('0xb')](_0x83f0('0xc'),_0x33674f,_[_0x83f0('0x16')](_0x383592)?JSON[_0x83f0('0x17')](_0x383592):_0x383592);logger['info'](_0x83f0('0x14'),_0x33674f);_0x4a6f19[_0x83f0('0x15')]();}};};
\ No newline at end of file
+var _0x40a1=['[%s][TAG]\x20%s','map','message','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','channel','Interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','interaction','catch','stringify','finally','next','error','isObject','lodash','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../../../config/logger','routing','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','validate','length'];(function(_0x5d6c6c,_0x5e3a45){var _0x177d5d=function(_0x4dd12f){while(--_0x4dd12f){_0x5d6c6c['push'](_0x5d6c6c['shift']());}};_0x177d5d(++_0x5e3a45);}(_0x40a1,0x1dc));var _0x140a=function(_0x5da4e6,_0x4dfd99){_0x5da4e6=_0x5da4e6-0x0;var _0x483614=_0x40a1[_0x5da4e6];return _0x483614;};'use strict';var schema=require('validate');var _=require(_0x140a('0x0'));var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x140a('0x1')),'mailInteraction':require(_0x140a('0x2')),'faxInteraction':require(_0x140a('0x3')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};var logger=require(_0x140a('0x4'))(_0x140a('0x5'));var tag=schema({'tag':{'type':'number','required':!![],'message':_0x140a('0x6')}});exports[_0x140a('0x7')]=function(_0x5b8686,_0x5cc964,_0x5ca22a,_0x12b316){return function(_0x3bcfa7){try{var _0x21076f={'tag':_0x5cc964[0x0]};var _0x150b63=tag[_0x140a('0x8')](_0x21076f,{'typecast':!![]});if(_0x150b63[_0x140a('0x9')]){logger['error'](_0x140a('0xa'),_0x5b8686,_[_0x140a('0xb')](_0x150b63,_0x140a('0xc'))[_0x140a('0xd')](',\x20'));logger[_0x140a('0xe')](_0x140a('0xf'),_0x5b8686);_0x3bcfa7['next']();}else{var _0x1a2ebb={'ids':[_0x5cc964[0x0]]};if(rpc[_0x12b316[_0x140a('0x10')]+_0x140a('0x11')]){rpc[_0x12b316[_0x140a('0x10')]+_0x140a('0x11')]['addTags'](_0x12b316['interaction']['id'],_0x1a2ebb)[_0x140a('0x12')](function(_0x59a703){logger[_0x140a('0xe')](_0x140a('0x13'),_0x5b8686,_0x5cc964[0x1],_0x12b316[_0x140a('0x10')],_0x12b316[_0x140a('0x14')]['id']);})[_0x140a('0x15')](function(_0xdb0b76){logger['error'](_0x140a('0xa'),_0x5b8686,JSON[_0x140a('0x16')](_0xdb0b76));logger[_0x140a('0xe')](_0x140a('0xf'),_0x5b8686);})[_0x140a('0x17')](function(){_0x3bcfa7[_0x140a('0x18')]();});}}}catch(_0x533927){logger[_0x140a('0x19')](_0x140a('0xa'),_0x5b8686,_[_0x140a('0x1a')](_0x533927)?JSON[_0x140a('0x16')](_0x533927):_0x533927);logger[_0x140a('0xe')](_0x140a('0xf'),_0x5b8686);_0x3bcfa7['next']();}};};
\ No newline at end of file