Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / openchannelMessage / openchannelMessage.rpc.js
index 3ded576..b492ccf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82f8=['stringify','error','code','OpenchannelMessage,\x20%s,\x20%s','message','result','catch','CreateOpenchannelMessage','OpenchannelMessage','create','body','options','raw','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','redis','defaults','localhost','register','request','then','info','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x27ae85,_0x59665b){var _0x45b957=function(_0xc4cad8){while(--_0xc4cad8){_0x27ae85['push'](_0x27ae85['shift']());}};_0x45b957(++_0x59665b);}(_0x82f8,0x157));var _0x882f=function(_0x39adcf,_0x5a4aeb){_0x39adcf=_0x39adcf-0x0;var _0x1c941d=_0x82f8[_0x39adcf];return _0x1c941d;};'use strict';var _=require('lodash');var util=require(_0x882f('0x0'));var moment=require(_0x882f('0x1'));var BPromise=require('bluebird');var rs=require(_0x882f('0x2'));var fs=require('fs');var Redis=require(_0x882f('0x3'));var db=require(_0x882f('0x4'))['db'];var utils=require(_0x882f('0x5'));var logger=require(_0x882f('0x6'))(_0x882f('0x7'));var config=require(_0x882f('0x8'));var jayson=require(_0x882f('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0x882f('0xa')]=_[_0x882f('0xb')](config[_0x882f('0xa')],{'host':_0x882f('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x882f('0xa')]));require('./openchannelMessage.socket')[_0x882f('0xd')](socket);function respondWithRpcPromise(_0x478c18,_0x3ead6e,_0x5e9b49){return new BPromise(function(_0x499654,_0x14d89b){return client[_0x882f('0xe')](_0x478c18,_0x5e9b49)[_0x882f('0xf')](function(_0x2f2e51){logger[_0x882f('0x10')]('OpenchannelMessage,\x20%s,\x20%s',_0x3ead6e,'request\x20sent');logger[_0x882f('0x11')](_0x882f('0x12'),_0x3ead6e,_0x882f('0x13'),JSON[_0x882f('0x14')](_0x2f2e51));if(_0x2f2e51[_0x882f('0x15')]){if(_0x2f2e51[_0x882f('0x15')][_0x882f('0x16')]===0x1f4){logger['error'](_0x882f('0x17'),_0x3ead6e,_0x2f2e51[_0x882f('0x15')][_0x882f('0x18')]);return _0x14d89b(_0x2f2e51[_0x882f('0x15')]['message']);}logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0x3ead6e,_0x2f2e51[_0x882f('0x15')][_0x882f('0x18')]);return _0x499654(_0x2f2e51[_0x882f('0x15')][_0x882f('0x18')]);}else{logger[_0x882f('0x10')](_0x882f('0x17'),_0x3ead6e,_0x882f('0x13'));_0x499654(_0x2f2e51[_0x882f('0x19')]['message']);}})[_0x882f('0x1a')](function(_0x51e74f){logger['error'](_0x882f('0x17'),_0x3ead6e,_0x51e74f);_0x14d89b(_0x51e74f);});});}exports[_0x882f('0x1b')]=function(_0x4242ed){var _0x3dacd7=this;return new Promise(function(_0x54957a,_0x3cfc4e){return db[_0x882f('0x1c')][_0x882f('0x1d')](_0x4242ed[_0x882f('0x1e')],{'raw':_0x4242ed[_0x882f('0x1f')]?_0x4242ed[_0x882f('0x1f')][_0x882f('0x20')]===undefined?!![]:![]:!![]})[_0x882f('0xf')](function(_0x251ed0){logger['info']('CreateOpenchannelMessage',_0x4242ed);logger['debug'](_0x882f('0x1b'),_0x4242ed,JSON[_0x882f('0x14')](_0x251ed0));_0x54957a(_0x251ed0);})[_0x882f('0x1a')](function(_0x9ce278){logger[_0x882f('0x15')](_0x882f('0x1b'),_0x9ce278[_0x882f('0x18')],_0x4242ed);_0x3cfc4e(_0x3dacd7[_0x882f('0x15')](0x1f4,_0x9ce278[_0x882f('0x18')]));});});};
\ No newline at end of file
+var _0x7a54=['../../config/environment','jayson/promise','http','defaults','redis','socket.io-emitter','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateOpenchannelMessage','OpenchannelMessage','body','options','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x3fdcf1,_0x382ec5){var _0x484219=function(_0x5d5bae){while(--_0x5d5bae){_0x3fdcf1['push'](_0x3fdcf1['shift']());}};_0x484219(++_0x382ec5);}(_0x7a54,0x106));var _0x47a5=function(_0x5ac3bf,_0x251950){_0x5ac3bf=_0x5ac3bf-0x0;var _0x23839f=_0x7a54[_0x5ac3bf];return _0x23839f;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});config['redis']=_[_0x47a5('0xb')](config[_0x47a5('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x47a5('0xd'))(new Redis(config['redis']));require('./openchannelMessage.socket')['register'](socket);function respondWithRpcPromise(_0x2a0e98,_0x2baee7,_0x5e31dd){return new BPromise(function(_0x2eb0dd,_0x49e844){return client['request'](_0x2a0e98,_0x5e31dd)[_0x47a5('0xe')](function(_0x69e4d4){logger[_0x47a5('0xf')](_0x47a5('0x10'),_0x2baee7,_0x47a5('0x11'));logger[_0x47a5('0x12')](_0x47a5('0x13'),_0x2baee7,'request\x20sent',JSON[_0x47a5('0x14')](_0x69e4d4));if(_0x69e4d4[_0x47a5('0x15')]){if(_0x69e4d4[_0x47a5('0x15')][_0x47a5('0x16')]===0x1f4){logger[_0x47a5('0x15')](_0x47a5('0x10'),_0x2baee7,_0x69e4d4[_0x47a5('0x15')][_0x47a5('0x17')]);return _0x49e844(_0x69e4d4['error'][_0x47a5('0x17')]);}logger[_0x47a5('0x15')](_0x47a5('0x10'),_0x2baee7,_0x69e4d4[_0x47a5('0x15')][_0x47a5('0x17')]);return _0x2eb0dd(_0x69e4d4['error']['message']);}else{logger[_0x47a5('0xf')]('OpenchannelMessage,\x20%s,\x20%s',_0x2baee7,'request\x20sent');_0x2eb0dd(_0x69e4d4[_0x47a5('0x18')][_0x47a5('0x17')]);}})[_0x47a5('0x19')](function(_0x1ef371){logger[_0x47a5('0x15')](_0x47a5('0x10'),_0x2baee7,_0x1ef371);_0x49e844(_0x1ef371);});});}exports[_0x47a5('0x1a')]=function(_0xe3c618){var _0x3aed38=this;return new Promise(function(_0x4a9fcb,_0x1570bc){return db[_0x47a5('0x1b')]['create'](_0xe3c618[_0x47a5('0x1c')],{'raw':_0xe3c618[_0x47a5('0x1d')]?_0xe3c618[_0x47a5('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0x47a5('0xe')](function(_0x2f142b){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xe3c618);logger['debug'](_0x47a5('0x1a'),_0xe3c618,JSON[_0x47a5('0x14')](_0x2f142b));_0x4a9fcb(_0x2f142b);})['catch'](function(_0x28747d){logger[_0x47a5('0x15')](_0x47a5('0x1a'),_0x28747d[_0x47a5('0x17')],_0xe3c618);_0x1570bc(_0x3aed38[_0x47a5('0x15')](0x1f4,_0x28747d['message']));});});};
\ No newline at end of file