Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / chatMessage / chatMessage.rpc.js
index 1c0b48e..27dacf9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9461=['request\x20sent','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatMessage,\x20%s,\x20%s','message','result','catch','CreateChatMessage','create','options','debug','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','localhost','redis','./chatMessage.socket','register','request','then','info'];(function(_0x2730da,_0x1098bd){var _0xfe9991=function(_0x2ea521){while(--_0x2ea521){_0x2730da['push'](_0x2730da['shift']());}};_0xfe9991(++_0x1098bd);}(_0x9461,0x1a0));var _0x1946=function(_0x5e611,_0x1ce7f5){_0x5e611=_0x5e611-0x0;var _0x45a572=_0x9461[_0x5e611];return _0x45a572;};'use strict';var _=require('lodash');var util=require(_0x1946('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x1946('0x1'));var fs=require('fs');var Redis=require(_0x1946('0x2'));var db=require(_0x1946('0x3'))['db'];var utils=require(_0x1946('0x4'));var logger=require(_0x1946('0x5'))(_0x1946('0x6'));var config=require(_0x1946('0x7'));var jayson=require(_0x1946('0x8'));var client=jayson[_0x1946('0x9')][_0x1946('0xa')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':_0x1946('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1946('0xc')]));require(_0x1946('0xd'))[_0x1946('0xe')](socket);function respondWithRpcPromise(_0x3c33cf,_0x8a13a9,_0x1b5abd){return new BPromise(function(_0x206a06,_0x182252){return client[_0x1946('0xf')](_0x3c33cf,_0x1b5abd)[_0x1946('0x10')](function(_0x3470d2){logger[_0x1946('0x11')]('ChatMessage,\x20%s,\x20%s',_0x8a13a9,_0x1946('0x12'));logger['debug'](_0x1946('0x13'),_0x8a13a9,'request\x20sent',JSON[_0x1946('0x14')](_0x3470d2));if(_0x3470d2['error']){if(_0x3470d2[_0x1946('0x15')][_0x1946('0x16')]===0x1f4){logger[_0x1946('0x15')](_0x1946('0x17'),_0x8a13a9,_0x3470d2[_0x1946('0x15')][_0x1946('0x18')]);return _0x182252(_0x3470d2['error'][_0x1946('0x18')]);}logger[_0x1946('0x15')](_0x1946('0x17'),_0x8a13a9,_0x3470d2[_0x1946('0x15')]['message']);return _0x206a06(_0x3470d2['error'][_0x1946('0x18')]);}else{logger[_0x1946('0x11')](_0x1946('0x17'),_0x8a13a9,_0x1946('0x12'));_0x206a06(_0x3470d2[_0x1946('0x19')]['message']);}})[_0x1946('0x1a')](function(_0x1240c0){logger[_0x1946('0x15')](_0x1946('0x17'),_0x8a13a9,_0x1240c0);_0x182252(_0x1240c0);});});}exports[_0x1946('0x1b')]=function(_0x466d69){var _0x5d76da=this;return new Promise(function(_0x30e893,_0x20948d){return db['ChatMessage'][_0x1946('0x1c')](_0x466d69['body'],{'raw':_0x466d69[_0x1946('0x1d')]?_0x466d69[_0x1946('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0x1946('0x10')](function(_0x5a0ab5){logger[_0x1946('0x11')](_0x1946('0x1b'),_0x466d69);logger[_0x1946('0x1e')](_0x1946('0x1b'),_0x466d69,JSON[_0x1946('0x14')](_0x5a0ab5));_0x30e893(_0x5a0ab5);})[_0x1946('0x1a')](function(_0x204753){logger['error'](_0x1946('0x1b'),_0x204753[_0x1946('0x18')],_0x466d69);_0x20948d(_0x5d76da[_0x1946('0x15')](0x1f4,_0x204753[_0x1946('0x18')]));});});};
\ 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