Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / chatMessage / chatMessage.rpc.js
index a4705b3..27dacf9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc22f=['localhost','socket.io-emitter','./chatMessage.socket','register','request','ChatMessage,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','CreateChatMessage','ChatMessage','create','body','options','raw','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','redis'];(function(_0x2bdba7,_0x24f2c3){var _0x283dfe=function(_0x1065dc){while(--_0x1065dc){_0x2bdba7['push'](_0x2bdba7['shift']());}};_0x283dfe(++_0x24f2c3);}(_0xc22f,0xbf));var _0xfc22=function(_0x422957,_0x6df95c){_0x422957=_0x422957-0x0;var _0x2b8cc5=_0xc22f[_0x422957];return _0x2b8cc5;};'use strict';var _=require(_0xfc22('0x0'));var util=require(_0xfc22('0x1'));var moment=require(_0xfc22('0x2'));var BPromise=require(_0xfc22('0x3'));var rs=require(_0xfc22('0x4'));var fs=require('fs');var Redis=require(_0xfc22('0x5'));var db=require(_0xfc22('0x6'))['db'];var utils=require(_0xfc22('0x7'));var logger=require(_0xfc22('0x8'))(_0xfc22('0x9'));var config=require(_0xfc22('0xa'));var jayson=require('jayson/promise');var client=jayson['client'][_0xfc22('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0xfc22('0xc')],{'host':_0xfc22('0xd'),'port':0x18eb});var socket=require(_0xfc22('0xe'))(new Redis(config[_0xfc22('0xc')]));require(_0xfc22('0xf'))[_0xfc22('0x10')](socket);function respondWithRpcPromise(_0x17fd71,_0x20d356,_0x535d1d){return new BPromise(function(_0x322e50,_0x3445e5){return client[_0xfc22('0x11')](_0x17fd71,_0x535d1d)['then'](function(_0x5d48e7){logger['info'](_0xfc22('0x12'),_0x20d356,_0xfc22('0x13'));logger['debug']('ChatMessage,\x20%s,\x20%s,\x20%s',_0x20d356,_0xfc22('0x13'),JSON[_0xfc22('0x14')](_0x5d48e7));if(_0x5d48e7['error']){if(_0x5d48e7[_0xfc22('0x15')][_0xfc22('0x16')]===0x1f4){logger[_0xfc22('0x15')](_0xfc22('0x12'),_0x20d356,_0x5d48e7[_0xfc22('0x15')][_0xfc22('0x17')]);return _0x3445e5(_0x5d48e7['error'][_0xfc22('0x17')]);}logger[_0xfc22('0x15')](_0xfc22('0x12'),_0x20d356,_0x5d48e7[_0xfc22('0x15')][_0xfc22('0x17')]);return _0x322e50(_0x5d48e7[_0xfc22('0x15')][_0xfc22('0x17')]);}else{logger[_0xfc22('0x18')](_0xfc22('0x12'),_0x20d356,_0xfc22('0x13'));_0x322e50(_0x5d48e7[_0xfc22('0x19')][_0xfc22('0x17')]);}})[_0xfc22('0x1a')](function(_0x92770d){logger[_0xfc22('0x15')](_0xfc22('0x12'),_0x20d356,_0x92770d);_0x3445e5(_0x92770d);});});}exports[_0xfc22('0x1b')]=function(_0x5d9c16){var _0x464bbd=this;return new Promise(function(_0x582b9c,_0x1ffeaf){return db[_0xfc22('0x1c')][_0xfc22('0x1d')](_0x5d9c16[_0xfc22('0x1e')],{'raw':_0x5d9c16[_0xfc22('0x1f')]?_0x5d9c16[_0xfc22('0x1f')][_0xfc22('0x20')]===undefined?!![]:![]:!![]})['then'](function(_0x1ed300){logger[_0xfc22('0x18')](_0xfc22('0x1b'),_0x5d9c16);logger[_0xfc22('0x21')](_0xfc22('0x1b'),_0x5d9c16,JSON[_0xfc22('0x14')](_0x1ed300));_0x582b9c(_0x1ed300);})[_0xfc22('0x1a')](function(_0x4d04ac){logger[_0xfc22('0x15')](_0xfc22('0x1b'),_0x4d04ac[_0xfc22('0x17')],_0x5d9c16);_0x1ffeaf(_0x464bbd[_0xfc22('0x15')](0x1f4,_0x4d04ac[_0xfc22('0x17')]));});});};
\ No newline at end of file
+var _0x51ca=['request','then','ChatMessage,\x20%s,\x20%s','ChatMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','CreateChatMessage','ChatMessage','create','body','options','raw','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','./chatMessage.socket','register'];(function(_0x1322fa,_0x49f393){var _0x55d9ae=function(_0x568c0d){while(--_0x568c0d){_0x1322fa['push'](_0x1322fa['shift']());}};_0x55d9ae(++_0x49f393);}(_0x51ca,0x1e0));var _0xa51c=function(_0x15c421,_0x6366f7){_0x15c421=_0x15c421-0x0;var _0x5e5ed5=_0x51ca[_0x15c421];return _0x5e5ed5;};'use strict';var _=require('lodash');var util=require(_0xa51c('0x0'));var moment=require('moment');var BPromise=require(_0xa51c('0x1'));var rs=require(_0xa51c('0x2'));var fs=require('fs');var Redis=require(_0xa51c('0x3'));var db=require(_0xa51c('0x4'))['db'];var utils=require(_0xa51c('0x5'));var logger=require(_0xa51c('0x6'))(_0xa51c('0x7'));var config=require('../../config/environment');var jayson=require(_0xa51c('0x8'));var client=jayson[_0xa51c('0x9')][_0xa51c('0xa')]({'port':0x232a});config['redis']=_['defaults'](config[_0xa51c('0xb')],{'host':_0xa51c('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa51c('0xb')]));require(_0xa51c('0xd'))[_0xa51c('0xe')](socket);function respondWithRpcPromise(_0x523a9d,_0x15a531,_0x3acd0c){return new BPromise(function(_0x101c02,_0x4ed2db){return client[_0xa51c('0xf')](_0x523a9d,_0x3acd0c)[_0xa51c('0x10')](function(_0x4a9016){logger['info'](_0xa51c('0x11'),_0x15a531,'request\x20sent');logger['debug'](_0xa51c('0x12'),_0x15a531,_0xa51c('0x13'),JSON[_0xa51c('0x14')](_0x4a9016));if(_0x4a9016['error']){if(_0x4a9016[_0xa51c('0x15')][_0xa51c('0x16')]===0x1f4){logger[_0xa51c('0x15')]('ChatMessage,\x20%s,\x20%s',_0x15a531,_0x4a9016['error'][_0xa51c('0x17')]);return _0x4ed2db(_0x4a9016[_0xa51c('0x15')][_0xa51c('0x17')]);}logger[_0xa51c('0x15')](_0xa51c('0x11'),_0x15a531,_0x4a9016[_0xa51c('0x15')][_0xa51c('0x17')]);return _0x101c02(_0x4a9016['error']['message']);}else{logger[_0xa51c('0x18')](_0xa51c('0x11'),_0x15a531,'request\x20sent');_0x101c02(_0x4a9016[_0xa51c('0x19')][_0xa51c('0x17')]);}})['catch'](function(_0x5adda7){logger[_0xa51c('0x15')](_0xa51c('0x11'),_0x15a531,_0x5adda7);_0x4ed2db(_0x5adda7);});});}exports[_0xa51c('0x1a')]=function(_0x52e87e){var _0x20abc6=this;return new Promise(function(_0x10bd55,_0x264454){return db[_0xa51c('0x1b')][_0xa51c('0x1c')](_0x52e87e[_0xa51c('0x1d')],{'raw':_0x52e87e[_0xa51c('0x1e')]?_0x52e87e[_0xa51c('0x1e')][_0xa51c('0x1f')]===undefined?!![]:![]:!![]})[_0xa51c('0x10')](function(_0x45d179){logger[_0xa51c('0x18')](_0xa51c('0x1a'),_0x52e87e);logger['debug'](_0xa51c('0x1a'),_0x52e87e,JSON[_0xa51c('0x14')](_0x45d179));_0x10bd55(_0x45d179);})[_0xa51c('0x20')](function(_0x561235){logger[_0xa51c('0x15')](_0xa51c('0x1a'),_0x561235['message'],_0x52e87e);_0x264454(_0x20abc6[_0xa51c('0x15')](0x1f4,_0x561235[_0xa51c('0x17')]));});});};
\ No newline at end of file