Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / api / chatMessage / chatMessage.rpc.js
index 9c11b7c..cdfeb9f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeddd=['error','code','message','result','CreateChatMessage','ChatMessage','body','options','raw','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','./chatMessage.socket','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x1a530b,_0x482e3b){var _0xfdada1=function(_0x3a9c7b){while(--_0x3a9c7b){_0x1a530b['push'](_0x1a530b['shift']());}};_0xfdada1(++_0x482e3b);}(_0xeddd,0xaa));var _0xdedd=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0xeddd[_0x2d2c16];return _0x53f2fb;};'use strict';var _=require(_0xdedd('0x0'));var util=require(_0xdedd('0x1'));var moment=require('moment');var BPromise=require(_0xdedd('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xdedd('0x3'));var db=require(_0xdedd('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xdedd('0x5'))('rpc');var config=require(_0xdedd('0x6'));var jayson=require(_0xdedd('0x7'));var client=jayson[_0xdedd('0x8')][_0xdedd('0x9')]({'port':0x232a});config['redis']=_[_0xdedd('0xa')](config[_0xdedd('0xb')],{'host':_0xdedd('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xdedd('0xb')]));require(_0xdedd('0xd'))['register'](socket);function respondWithRpcPromise(_0xaf1b57,_0xbc0ab3,_0x4e09f6){return new BPromise(function(_0xb2b58d,_0x4f40f7){return client[_0xdedd('0xe')](_0xaf1b57,_0x4e09f6)[_0xdedd('0xf')](function(_0x40fffa){logger[_0xdedd('0x10')](_0xdedd('0x11'),_0xbc0ab3,_0xdedd('0x12'));logger[_0xdedd('0x13')](_0xdedd('0x14'),_0xbc0ab3,_0xdedd('0x12'),JSON[_0xdedd('0x15')](_0x40fffa));if(_0x40fffa[_0xdedd('0x16')]){if(_0x40fffa[_0xdedd('0x16')][_0xdedd('0x17')]===0x1f4){logger[_0xdedd('0x16')](_0xdedd('0x11'),_0xbc0ab3,_0x40fffa['error']['message']);return _0x4f40f7(_0x40fffa['error']['message']);}logger[_0xdedd('0x16')](_0xdedd('0x11'),_0xbc0ab3,_0x40fffa[_0xdedd('0x16')][_0xdedd('0x18')]);return _0xb2b58d(_0x40fffa['error']['message']);}else{logger[_0xdedd('0x10')]('ChatMessage,\x20%s,\x20%s',_0xbc0ab3,_0xdedd('0x12'));_0xb2b58d(_0x40fffa[_0xdedd('0x19')][_0xdedd('0x18')]);}})['catch'](function(_0xb4ddbc){logger[_0xdedd('0x16')]('ChatMessage,\x20%s,\x20%s',_0xbc0ab3,_0xb4ddbc);_0x4f40f7(_0xb4ddbc);});});}exports[_0xdedd('0x1a')]=function(_0x18b098){var _0x594fe1=this;return new Promise(function(_0x42f98d,_0x4566c0){return db[_0xdedd('0x1b')]['create'](_0x18b098[_0xdedd('0x1c')],{'raw':_0x18b098[_0xdedd('0x1d')]?_0x18b098[_0xdedd('0x1d')][_0xdedd('0x1e')]===undefined?!![]:![]:!![]})[_0xdedd('0xf')](function(_0x51fb1c){logger['info'](_0xdedd('0x1a'),_0x18b098);logger[_0xdedd('0x13')](_0xdedd('0x1a'),_0x18b098,JSON[_0xdedd('0x15')](_0x51fb1c));_0x42f98d(_0x51fb1c);})[_0xdedd('0x1f')](function(_0x4166cb){logger['error'](_0xdedd('0x1a'),_0x4166cb['message'],_0x18b098);_0x4566c0(_0x594fe1[_0xdedd('0x16')](0x1f4,_0x4166cb['message']));});});};
\ No newline at end of file
+var _0x4829=['info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateChatMessage','ChatMessage','create','body','options','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','localhost','./chatMessage.socket','then'];(function(_0x4a45b4,_0x59804f){var _0x1a99c9=function(_0x3aa517){while(--_0x3aa517){_0x4a45b4['push'](_0x4a45b4['shift']());}};_0x1a99c9(++_0x59804f);}(_0x4829,0x107));var _0x9482=function(_0x836465,_0x5442ae){_0x836465=_0x836465-0x0;var _0x2150ea=_0x4829[_0x836465];return _0x2150ea;};'use strict';var _=require(_0x9482('0x0'));var util=require(_0x9482('0x1'));var moment=require(_0x9482('0x2'));var BPromise=require(_0x9482('0x3'));var rs=require(_0x9482('0x4'));var fs=require('fs');var Redis=require(_0x9482('0x5'));var db=require(_0x9482('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x9482('0x7'))('rpc');var config=require(_0x9482('0x8'));var jayson=require(_0x9482('0x9'));var client=jayson[_0x9482('0xa')]['http']({'port':0x232a});config[_0x9482('0xb')]=_[_0x9482('0xc')](config[_0x9482('0xb')],{'host':_0x9482('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9482('0xb')]));require(_0x9482('0xe'))['register'](socket);function respondWithRpcPromise(_0xb3aef7,_0x1250d7,_0x37cdc7){return new BPromise(function(_0x323677,_0x247e32){return client['request'](_0xb3aef7,_0x37cdc7)[_0x9482('0xf')](function(_0x4b72b3){logger[_0x9482('0x10')](_0x9482('0x11'),_0x1250d7,_0x9482('0x12'));logger[_0x9482('0x13')](_0x9482('0x14'),_0x1250d7,'request\x20sent',JSON[_0x9482('0x15')](_0x4b72b3));if(_0x4b72b3[_0x9482('0x16')]){if(_0x4b72b3['error']['code']===0x1f4){logger[_0x9482('0x16')]('ChatMessage,\x20%s,\x20%s',_0x1250d7,_0x4b72b3[_0x9482('0x16')][_0x9482('0x17')]);return _0x247e32(_0x4b72b3['error'][_0x9482('0x17')]);}logger[_0x9482('0x16')](_0x9482('0x11'),_0x1250d7,_0x4b72b3[_0x9482('0x16')][_0x9482('0x17')]);return _0x323677(_0x4b72b3[_0x9482('0x16')][_0x9482('0x17')]);}else{logger['info']('ChatMessage,\x20%s,\x20%s',_0x1250d7,'request\x20sent');_0x323677(_0x4b72b3[_0x9482('0x18')][_0x9482('0x17')]);}})[_0x9482('0x19')](function(_0x366149){logger[_0x9482('0x16')](_0x9482('0x11'),_0x1250d7,_0x366149);_0x247e32(_0x366149);});});}exports[_0x9482('0x1a')]=function(_0xc9eb5f){var _0x3b7fe1=this;return new Promise(function(_0x515036,_0x10b751){return db[_0x9482('0x1b')][_0x9482('0x1c')](_0xc9eb5f[_0x9482('0x1d')],{'raw':_0xc9eb5f[_0x9482('0x1e')]?_0xc9eb5f[_0x9482('0x1e')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x58b982){logger[_0x9482('0x10')](_0x9482('0x1a'),_0xc9eb5f);logger['debug'](_0x9482('0x1a'),_0xc9eb5f,JSON['stringify'](_0x58b982));_0x515036(_0x58b982);})[_0x9482('0x19')](function(_0x3df5d8){logger[_0x9482('0x16')](_0x9482('0x1a'),_0x3df5d8[_0x9482('0x17')],_0xc9eb5f);_0x10b751(_0x3b7fe1[_0x9482('0x16')](0x1f4,_0x3df5d8[_0x9482('0x17')]));});});};
\ No newline at end of file