Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / chatWebsite / chatWebsite.rpc.js
index fa073a5..1af5422 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd943=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','redis','localhost','./chatWebsite.socket','register','request','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash'];(function(_0x1f6adc,_0x27b160){var _0x3eeba6=function(_0x25910c){while(--_0x25910c){_0x1f6adc['push'](_0x1f6adc['shift']());}};_0x3eeba6(++_0x27b160);}(_0xd943,0x15d));var _0x3d94=function(_0x113469,_0x39007a){_0x113469=_0x113469-0x0;var _0x1940ff=_0xd943[_0x113469];return _0x1940ff;};'use strict';var _=require(_0x3d94('0x0'));var util=require(_0x3d94('0x1'));var moment=require(_0x3d94('0x2'));var BPromise=require(_0x3d94('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3d94('0x4'));var db=require(_0x3d94('0x5'))['db'];var utils=require(_0x3d94('0x6'));var logger=require(_0x3d94('0x7'))(_0x3d94('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x3d94('0x9')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x3d94('0xa')],{'host':_0x3d94('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x3d94('0xc'))[_0x3d94('0xd')](socket);function respondWithRpcPromise(_0x1cc58c,_0x5908a7,_0x182066){return new BPromise(function(_0x4ac968,_0x39e2fa){return client[_0x3d94('0xe')](_0x1cc58c,_0x182066)['then'](function(_0x1897de){logger[_0x3d94('0xf')](_0x3d94('0x10'),_0x5908a7,_0x3d94('0x11'));logger[_0x3d94('0x12')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x5908a7,_0x3d94('0x11'),JSON[_0x3d94('0x13')](_0x1897de));if(_0x1897de[_0x3d94('0x14')]){if(_0x1897de['error'][_0x3d94('0x15')]===0x1f4){logger[_0x3d94('0x14')](_0x3d94('0x10'),_0x5908a7,_0x1897de['error'][_0x3d94('0x16')]);return _0x39e2fa(_0x1897de[_0x3d94('0x14')][_0x3d94('0x16')]);}logger[_0x3d94('0x14')](_0x3d94('0x10'),_0x5908a7,_0x1897de[_0x3d94('0x14')][_0x3d94('0x16')]);return _0x4ac968(_0x1897de[_0x3d94('0x14')]['message']);}else{logger[_0x3d94('0xf')](_0x3d94('0x10'),_0x5908a7,_0x3d94('0x11'));_0x4ac968(_0x1897de[_0x3d94('0x17')][_0x3d94('0x16')]);}})[_0x3d94('0x18')](function(_0xef8b3){logger['error'](_0x3d94('0x10'),_0x5908a7,_0xef8b3);_0x39e2fa(_0xef8b3);});});}
\ No newline at end of file
+var _0x1740=['rpc','../../config/environment','jayson/promise','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','request','then','info','ChatWebsite,\x20%s,\x20%s','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x5a89ea,_0x436388){var _0x21193d=function(_0x1a9118){while(--_0x1a9118){_0x5a89ea['push'](_0x5a89ea['shift']());}};_0x21193d(++_0x436388);}(_0x1740,0x121));var _0x0174=function(_0x95429c,_0x34a8bd){_0x95429c=_0x95429c-0x0;var _0x21348a=_0x1740[_0x95429c];return _0x21348a;};'use strict';var _=require(_0x0174('0x0'));var util=require(_0x0174('0x1'));var moment=require(_0x0174('0x2'));var BPromise=require(_0x0174('0x3'));var rs=require(_0x0174('0x4'));var fs=require('fs');var Redis=require(_0x0174('0x5'));var db=require(_0x0174('0x6'))['db'];var utils=require(_0x0174('0x7'));var logger=require('../../config/logger')(_0x0174('0x8'));var config=require(_0x0174('0x9'));var jayson=require(_0x0174('0xa'));var client=jayson['client']['http']({'port':0x232a});config[_0x0174('0xb')]=_[_0x0174('0xc')](config['redis'],{'host':_0x0174('0xd'),'port':0x18eb});var socket=require(_0x0174('0xe'))(new Redis(config['redis']));require(_0x0174('0xf'))['register'](socket);function respondWithRpcPromise(_0x7922d,_0x3469e6,_0x500875){return new BPromise(function(_0x79dbe7,_0x5b50b4){return client[_0x0174('0x10')](_0x7922d,_0x500875)[_0x0174('0x11')](function(_0xd02ba2){logger[_0x0174('0x12')](_0x0174('0x13'),_0x3469e6,'request\x20sent');logger[_0x0174('0x14')](_0x0174('0x15'),_0x3469e6,'request\x20sent',JSON[_0x0174('0x16')](_0xd02ba2));if(_0xd02ba2[_0x0174('0x17')]){if(_0xd02ba2['error'][_0x0174('0x18')]===0x1f4){logger[_0x0174('0x17')](_0x0174('0x13'),_0x3469e6,_0xd02ba2[_0x0174('0x17')][_0x0174('0x19')]);return _0x5b50b4(_0xd02ba2['error']['message']);}logger[_0x0174('0x17')]('ChatWebsite,\x20%s,\x20%s',_0x3469e6,_0xd02ba2['error'][_0x0174('0x19')]);return _0x79dbe7(_0xd02ba2['error'][_0x0174('0x19')]);}else{logger['info'](_0x0174('0x13'),_0x3469e6,_0x0174('0x1a'));_0x79dbe7(_0xd02ba2['result'][_0x0174('0x19')]);}})['catch'](function(_0x185e02){logger[_0x0174('0x17')](_0x0174('0x13'),_0x3469e6,_0x185e02);_0x5b50b4(_0x185e02);});});}
\ No newline at end of file