Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / openchannelMessage / openchannelMessage.rpc.js
index 0dce934..62f19b8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc891=['message','result','catch','CreateOpenchannelMessage','OpenchannelMessage','options','raw','then','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./openchannelMessage.socket','request','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x1f5cfd,_0x30876f){var _0x3af417=function(_0x3dde79){while(--_0x3dde79){_0x1f5cfd['push'](_0x1f5cfd['shift']());}};_0x3af417(++_0x30876f);}(_0xc891,0x152));var _0x1c89=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0xc891[_0x2d7f0e];return _0x110b07;};'use strict';var _=require(_0x1c89('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x1c89('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1c89('0x2'));var db=require(_0x1c89('0x3'))['db'];var utils=require(_0x1c89('0x4'));var logger=require('../../config/logger')(_0x1c89('0x5'));var config=require(_0x1c89('0x6'));var jayson=require(_0x1c89('0x7'));var client=jayson[_0x1c89('0x8')]['http']({'port':0x232a});config[_0x1c89('0x9')]=_[_0x1c89('0xa')](config['redis'],{'host':_0x1c89('0xb'),'port':0x18eb});var socket=require(_0x1c89('0xc'))(new Redis(config['redis']));require(_0x1c89('0xd'))['register'](socket);function respondWithRpcPromise(_0x21f69d,_0x4a9ffa,_0x4b57fc){return new BPromise(function(_0x4c69e3,_0x478ca1){return client[_0x1c89('0xe')](_0x21f69d,_0x4b57fc)['then'](function(_0x289f67){logger[_0x1c89('0xf')](_0x1c89('0x10'),_0x4a9ffa,_0x1c89('0x11'));logger[_0x1c89('0x12')](_0x1c89('0x13'),_0x4a9ffa,_0x1c89('0x11'),JSON[_0x1c89('0x14')](_0x289f67));if(_0x289f67['error']){if(_0x289f67[_0x1c89('0x15')]['code']===0x1f4){logger[_0x1c89('0x15')](_0x1c89('0x10'),_0x4a9ffa,_0x289f67[_0x1c89('0x15')]['message']);return _0x478ca1(_0x289f67[_0x1c89('0x15')][_0x1c89('0x16')]);}logger[_0x1c89('0x15')]('OpenchannelMessage,\x20%s,\x20%s',_0x4a9ffa,_0x289f67[_0x1c89('0x15')][_0x1c89('0x16')]);return _0x4c69e3(_0x289f67[_0x1c89('0x15')][_0x1c89('0x16')]);}else{logger[_0x1c89('0xf')](_0x1c89('0x10'),_0x4a9ffa,_0x1c89('0x11'));_0x4c69e3(_0x289f67[_0x1c89('0x17')][_0x1c89('0x16')]);}})[_0x1c89('0x18')](function(_0x2d2e23){logger['error'](_0x1c89('0x10'),_0x4a9ffa,_0x2d2e23);_0x478ca1(_0x2d2e23);});});}exports[_0x1c89('0x19')]=function(_0x4c9069){var _0xdb5b03=this;return new Promise(function(_0x3b43a3,_0x14121c){return db[_0x1c89('0x1a')]['create'](_0x4c9069['body'],{'raw':_0x4c9069[_0x1c89('0x1b')]?_0x4c9069[_0x1c89('0x1b')][_0x1c89('0x1c')]===undefined?!![]:![]:!![]})[_0x1c89('0x1d')](function(_0x5b4fbc){logger[_0x1c89('0xf')](_0x1c89('0x19'),_0x4c9069);logger['debug'](_0x1c89('0x19'),_0x4c9069,JSON[_0x1c89('0x14')](_0x5b4fbc));_0x3b43a3(_0x5b4fbc);})[_0x1c89('0x18')](function(_0x479a19){logger[_0x1c89('0x15')](_0x1c89('0x19'),_0x479a19[_0x1c89('0x16')],_0x4c9069);_0x14121c(_0xdb5b03['error'](0x1f4,_0x479a19[_0x1c89('0x16')]));});});};
\ No newline at end of file
+var _0x2ef3=['lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','redis','defaults','localhost','socket.io-emitter','./openchannelMessage.socket','register','request','then','OpenchannelMessage,\x20%s,\x20%s','debug','request\x20sent','stringify','code','error','message','result','catch','CreateOpenchannelMessage','create','options','info'];(function(_0x2423f3,_0x5a3cba){var _0x818443=function(_0x35e8c8){while(--_0x35e8c8){_0x2423f3['push'](_0x2423f3['shift']());}};_0x818443(++_0x5a3cba);}(_0x2ef3,0xba));var _0x32ef=function(_0x5bbe5b,_0x3fefb3){_0x5bbe5b=_0x5bbe5b-0x0;var _0x6a96eb=_0x2ef3[_0x5bbe5b];return _0x6a96eb;};'use strict';var _=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var moment=require(_0x32ef('0x2'));var BPromise=require(_0x32ef('0x3'));var rs=require(_0x32ef('0x4'));var fs=require('fs');var Redis=require(_0x32ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('rpc');var config=require(_0x32ef('0x8'));var jayson=require(_0x32ef('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0x32ef('0xa')]=_[_0x32ef('0xb')](config[_0x32ef('0xa')],{'host':_0x32ef('0xc'),'port':0x18eb});var socket=require(_0x32ef('0xd'))(new Redis(config[_0x32ef('0xa')]));require(_0x32ef('0xe'))[_0x32ef('0xf')](socket);function respondWithRpcPromise(_0x28275c,_0x77df79,_0x56eb42){return new BPromise(function(_0x5780e9,_0x401d0b){return client[_0x32ef('0x10')](_0x28275c,_0x56eb42)[_0x32ef('0x11')](function(_0x1499c2){logger['info'](_0x32ef('0x12'),_0x77df79,'request\x20sent');logger[_0x32ef('0x13')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x77df79,_0x32ef('0x14'),JSON[_0x32ef('0x15')](_0x1499c2));if(_0x1499c2['error']){if(_0x1499c2['error'][_0x32ef('0x16')]===0x1f4){logger['error'](_0x32ef('0x12'),_0x77df79,_0x1499c2[_0x32ef('0x17')][_0x32ef('0x18')]);return _0x401d0b(_0x1499c2[_0x32ef('0x17')]['message']);}logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0x77df79,_0x1499c2[_0x32ef('0x17')][_0x32ef('0x18')]);return _0x5780e9(_0x1499c2[_0x32ef('0x17')]['message']);}else{logger['info'](_0x32ef('0x12'),_0x77df79,_0x32ef('0x14'));_0x5780e9(_0x1499c2[_0x32ef('0x19')]['message']);}})[_0x32ef('0x1a')](function(_0x33e230){logger['error'](_0x32ef('0x12'),_0x77df79,_0x33e230);_0x401d0b(_0x33e230);});});}exports[_0x32ef('0x1b')]=function(_0x26aff3){var _0x251084=this;return new Promise(function(_0x445cda,_0x3aec05){return db['OpenchannelMessage'][_0x32ef('0x1c')](_0x26aff3['body'],{'raw':_0x26aff3[_0x32ef('0x1d')]?_0x26aff3[_0x32ef('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0x32ef('0x11')](function(_0x97780){logger[_0x32ef('0x1e')]('CreateOpenchannelMessage',_0x26aff3);logger['debug'](_0x32ef('0x1b'),_0x26aff3,JSON[_0x32ef('0x15')](_0x97780));_0x445cda(_0x97780);})[_0x32ef('0x1a')](function(_0x478bef){logger['error'](_0x32ef('0x1b'),_0x478bef['message'],_0x26aff3);_0x3aec05(_0x251084['error'](0x1f4,_0x478bef[_0x32ef('0x18')]));});});};
\ No newline at end of file