Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / services / routing / server / applications / tag.js
index 6e1ef40..c81c3e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f6e=['../../../../config/logger','routing','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','[%s][TAG]\x20%s','map','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','channel','Interaction','addTags','interaction','info','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','error','isObject','stringify','validate','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction'];(function(_0x227623,_0x3dd39a){var _0x1fd154=function(_0x4a8bcb){while(--_0x4a8bcb){_0x227623['push'](_0x227623['shift']());}};_0x1fd154(++_0x3dd39a);}(_0x3f6e,0x8a));var _0xe3f6=function(_0xf56b46,_0x4e32e8){_0xf56b46=_0xf56b46-0x0;var _0x583cea=_0x3f6e[_0xf56b46];return _0x583cea;};'use strict';var schema=require(_0xe3f6('0x0'));var _=require('lodash');var rpc={'chatInteraction':require(_0xe3f6('0x1')),'openchannelInteraction':require(_0xe3f6('0x2')),'smsInteraction':require(_0xe3f6('0x3')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0xe3f6('0x4')),'whatsappInteraction':require(_0xe3f6('0x5'))};var logger=require(_0xe3f6('0x6'))(_0xe3f6('0x7'));var tag=schema({'tag':{'type':'number','required':!![],'message':_0xe3f6('0x8')}});exports[_0xe3f6('0x9')]=function(_0x21c444,_0x1a1c1c,_0xbac629,_0x422f8d){return function(_0x13e5ec){try{var _0x2afc8e={'tag':_0x1a1c1c[0x0]};var _0xc73f63=tag[_0xe3f6('0x0')](_0x2afc8e,{'typecast':!![]});if(_0xc73f63[_0xe3f6('0xa')]){logger['error'](_0xe3f6('0xb'),_0x21c444,_[_0xe3f6('0xc')](_0xc73f63,'message')['join'](',\x20'));logger['info'](_0xe3f6('0xd'),_0x21c444);_0x13e5ec[_0xe3f6('0xe')]();}else{var _0x4cdf9c={'ids':[_0x1a1c1c[0x0]]};if(rpc[_0x422f8d[_0xe3f6('0xf')]+'Interaction']){rpc[_0x422f8d[_0xe3f6('0xf')]+_0xe3f6('0x10')][_0xe3f6('0x11')](_0x422f8d[_0xe3f6('0x12')]['id'],_0x4cdf9c)['then'](function(_0x452764){logger[_0xe3f6('0x13')](_0xe3f6('0x14'),_0x21c444,_0x1a1c1c[0x1],_0x422f8d['channel'],_0x422f8d[_0xe3f6('0x12')]['id']);})['catch'](function(_0xfd1f60){logger[_0xe3f6('0x15')]('[%s][TAG]\x20%s',_0x21c444,JSON['stringify'](_0xfd1f60));logger['info'](_0xe3f6('0xd'),_0x21c444);})['finally'](function(){_0x13e5ec[_0xe3f6('0xe')]();});}}}catch(_0x2665cb){logger[_0xe3f6('0x15')](_0xe3f6('0xb'),_0x21c444,_[_0xe3f6('0x16')](_0x2665cb)?JSON[_0xe3f6('0x17')](_0x2665cb):_0x2665cb);logger['info'](_0xe3f6('0xd'),_0x21c444);_0x13e5ec['next']();}};};
\ No newline at end of file
+var _0x6cf3=['length','error','[%s][TAG]\x20%s','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','channel','Interaction','addTags','interaction','then','catch','stringify','finally','validate','lodash','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/whatsappInteraction','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required'];(function(_0x30f457,_0x582ea5){var _0x1a8943=function(_0x4b242a){while(--_0x4b242a){_0x30f457['push'](_0x30f457['shift']());}};_0x1a8943(++_0x582ea5);}(_0x6cf3,0x6b));var _0x36cf=function(_0x438fda,_0x229abf){_0x438fda=_0x438fda-0x0;var _0x445087=_0x6cf3[_0x438fda];return _0x445087;};'use strict';var schema=require(_0x36cf('0x0'));var _=require(_0x36cf('0x1'));var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0x36cf('0x2')),'smsInteraction':require(_0x36cf('0x3')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x36cf('0x4'))};var logger=require('../../../../config/logger')(_0x36cf('0x5'));var tag=schema({'tag':{'type':_0x36cf('0x6'),'required':!![],'message':_0x36cf('0x7')}});exports['consequence']=function(_0x3310cf,_0x3c947e,_0x4d4fb6,_0xd816e6){return function(_0x486266){try{var _0x2a927a={'tag':_0x3c947e[0x0]};var _0xb4866b=tag[_0x36cf('0x0')](_0x2a927a,{'typecast':!![]});if(_0xb4866b[_0x36cf('0x8')]){logger[_0x36cf('0x9')](_0x36cf('0xa'),_0x3310cf,_['map'](_0xb4866b,'message')[_0x36cf('0xb')](',\x20'));logger[_0x36cf('0xc')](_0x36cf('0xd'),_0x3310cf);_0x486266[_0x36cf('0xe')]();}else{var _0x550034={'ids':[_0x3c947e[0x0]]};if(rpc[_0xd816e6[_0x36cf('0xf')]+_0x36cf('0x10')]){rpc[_0xd816e6[_0x36cf('0xf')]+_0x36cf('0x10')][_0x36cf('0x11')](_0xd816e6[_0x36cf('0x12')]['id'],_0x550034)[_0x36cf('0x13')](function(_0x57c7d6){logger['info']('[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s',_0x3310cf,_0x3c947e[0x1],_0xd816e6[_0x36cf('0xf')],_0xd816e6['interaction']['id']);})[_0x36cf('0x14')](function(_0x324665){logger[_0x36cf('0x9')](_0x36cf('0xa'),_0x3310cf,JSON[_0x36cf('0x15')](_0x324665));logger[_0x36cf('0xc')](_0x36cf('0xd'),_0x3310cf);})[_0x36cf('0x16')](function(){_0x486266[_0x36cf('0xe')]();});}}}catch(_0x3e53ee){logger[_0x36cf('0x9')](_0x36cf('0xa'),_0x3310cf,_['isObject'](_0x3e53ee)?JSON[_0x36cf('0x15')](_0x3e53ee):_0x3e53ee);logger['info'](_0x36cf('0xd'),_0x3310cf);_0x486266[_0x36cf('0xe')]();}};};
\ No newline at end of file