Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.rpc.js
index eb691f4..3524d27 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57ca=['client','http','request','info','request\x20sent','VoiceMailMessage,\x20%s,\x20%s,\x20%s','error','code','VoiceMailMessage,\x20%s,\x20%s','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0xd962a7,_0x5bcd85){var _0x39d866=function(_0x2f3db0){while(--_0x2f3db0){_0xd962a7['push'](_0xd962a7['shift']());}};_0x39d866(++_0x5bcd85);}(_0x57ca,0x108));var _0xa57c=function(_0x13bbc0,_0x4d777f){_0x13bbc0=_0x13bbc0-0x0;var _0x52de3f=_0x57ca[_0x13bbc0];return _0x52de3f;};'use strict';var _=require('lodash');var util=require(_0xa57c('0x0'));var moment=require(_0xa57c('0x1'));var BPromise=require('bluebird');var rs=require(_0xa57c('0x2'));var fs=require('fs');var Redis=require(_0xa57c('0x3'));var db=require(_0xa57c('0x4'))['db'];var utils=require(_0xa57c('0x5'));var logger=require(_0xa57c('0x6'))('rpc');var config=require(_0xa57c('0x7'));var jayson=require(_0xa57c('0x8'));var client=jayson[_0xa57c('0x9')][_0xa57c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xbdfffb,_0x314574,_0x19e28e){return new BPromise(function(_0x271ccc,_0x5e3962){return client[_0xa57c('0xb')](_0xbdfffb,_0x19e28e)['then'](function(_0x46ba92){logger[_0xa57c('0xc')]('VoiceMailMessage,\x20%s,\x20%s',_0x314574,_0xa57c('0xd'));logger['debug'](_0xa57c('0xe'),_0x314574,_0xa57c('0xd'),JSON['stringify'](_0x46ba92));if(_0x46ba92[_0xa57c('0xf')]){if(_0x46ba92['error'][_0xa57c('0x10')]===0x1f4){logger[_0xa57c('0xf')](_0xa57c('0x11'),_0x314574,_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);return _0x5e3962(_0x46ba92['error'][_0xa57c('0x12')]);}logger['error'](_0xa57c('0x11'),_0x314574,_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);return _0x271ccc(_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);}else{logger[_0xa57c('0xc')](_0xa57c('0x11'),_0x314574,'request\x20sent');_0x271ccc(_0x46ba92[_0xa57c('0x13')][_0xa57c('0x12')]);}})[_0xa57c('0x14')](function(_0x5a6024){logger[_0xa57c('0xf')]('VoiceMailMessage,\x20%s,\x20%s',_0x314574,_0x5a6024);_0x5e3962(_0x5a6024);});});}
\ No newline at end of file
+var _0xa3a7=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','request','VoiceMailMessage,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','randomstring'];(function(_0x144d8f,_0x4fe1d0){var _0x1c0fec=function(_0x13c029){while(--_0x13c029){_0x144d8f['push'](_0x144d8f['shift']());}};_0x1c0fec(++_0x4fe1d0);}(_0xa3a7,0x68));var _0x7a3a=function(_0x2544b4,_0x4f5ab1){_0x2544b4=_0x2544b4-0x0;var _0x5c2716=_0xa3a7[_0x2544b4];return _0x5c2716;};'use strict';var _=require(_0x7a3a('0x0'));var util=require(_0x7a3a('0x1'));var moment=require(_0x7a3a('0x2'));var BPromise=require('bluebird');var rs=require(_0x7a3a('0x3'));var fs=require('fs');var Redis=require(_0x7a3a('0x4'));var db=require(_0x7a3a('0x5'))['db'];var utils=require(_0x7a3a('0x6'));var logger=require(_0x7a3a('0x7'))(_0x7a3a('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7a3a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4b27c1,_0x3c6d5c,_0x3e374c){return new BPromise(function(_0x3b1dc9,_0x1ec051){return client[_0x7a3a('0xa')](_0x4b27c1,_0x3e374c)['then'](function(_0xb953c4){logger['info'](_0x7a3a('0xb'),_0x3c6d5c,_0x7a3a('0xc'));logger['debug']('VoiceMailMessage,\x20%s,\x20%s,\x20%s',_0x3c6d5c,_0x7a3a('0xc'),JSON[_0x7a3a('0xd')](_0xb953c4));if(_0xb953c4[_0x7a3a('0xe')]){if(_0xb953c4[_0x7a3a('0xe')]['code']===0x1f4){logger['error'](_0x7a3a('0xb'),_0x3c6d5c,_0xb953c4[_0x7a3a('0xe')]['message']);return _0x1ec051(_0xb953c4[_0x7a3a('0xe')][_0x7a3a('0xf')]);}logger[_0x7a3a('0xe')](_0x7a3a('0xb'),_0x3c6d5c,_0xb953c4[_0x7a3a('0xe')]['message']);return _0x3b1dc9(_0xb953c4[_0x7a3a('0xe')][_0x7a3a('0xf')]);}else{logger['info'](_0x7a3a('0xb'),_0x3c6d5c,'request\x20sent');_0x3b1dc9(_0xb953c4[_0x7a3a('0x10')]['message']);}})[_0x7a3a('0x11')](function(_0x1883ff){logger[_0x7a3a('0xe')](_0x7a3a('0xb'),_0x3c6d5c,_0x1883ff);_0x1ec051(_0x1883ff);});});}
\ No newline at end of file